diff options
author | Tom Willemse | 2020-10-19 09:04:28 -0700 |
---|---|---|
committer | Tom Willemse | 2020-10-19 09:04:28 -0700 |
commit | 6048293876be38c8dd08c5a76e168f06d57ceaf7 (patch) | |
tree | 36e584d5ea5d0206be26cc736801b0e1529d30b6 /test | |
parent | 5302d5a8aea1267dbdb2646e172e9442daaffb81 (diff) | |
download | emacs-config-6048293876be38c8dd08c5a76e168f06d57ceaf7.tar.gz emacs-config-6048293876be38c8dd08c5a76e168f06d57ceaf7.zip |
Add jenkinsfile-mode
Both ‘Jenkinsfile’ files and ‘*.pipeline’ files should be using
‘jenkinsfile-mode’.
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/oni-groovy.bats | 41 |
1 files changed, 41 insertions, 0 deletions
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" ]] +} |