From 6048293876be38c8dd08c5a76e168f06d57ceaf7 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 19 Oct 2020 09:04:28 -0700 Subject: Add jenkinsfile-mode Both ‘Jenkinsfile’ files and ‘*.pipeline’ files should be using ‘jenkinsfile-mode’. --- test/integration/oni-groovy.bats | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 test/integration/oni-groovy.bats (limited to 'test') diff --git a/test/integration/oni-groovy.bats b/test/integration/oni-groovy.bats new file mode 100755 index 0000000..5a768a3 --- /dev/null +++ b/test/integration/oni-groovy.bats @@ -0,0 +1,41 @@ +#!/usr/bin/env bats + +@test "Opening a .groovy file loads oni-groovy" { + run emacs -batch -l package -f package-initialize \ + -visit test.groovy \ + -eval "(prin1 (featurep 'oni-groovy))" + + echo "$output" + + [[ "$output" == *"t" ]] +} + +@test "Opening a Jenkinsfile loads oni-groovy" { + run emacs -batch -l package -f package-initialize \ + -visit Jenkinsfile \ + -eval "(prin1 (featurep 'oni-groovy))" + + echo "$output" + + [[ "$output" == *"t" ]] +} + +@test "Opening a .pipeline file loads oni-groovy" { + run emacs -batch -l package -f package-initialize \ + -visit test.pipeline \ + -eval "(prin1 (featurep 'oni-groovy))" + + echo "$output" + + [[ "$output" == *"t" ]] +} + +@test "Opening a .pipeline file loads jenkinsfile-mode" { + run emacs -batch -l package -f package-initialize \ + -visit "test.pipeline" \ + -eval "(prin1 major-mode)" + + echo "$output" + + [[ "$output" == *"jenkinsfile-mode" ]] +} -- cgit v1.2.3-54-g00ecf