aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGravatar Tom Willemse2020-10-19 09:04:28 -0700
committerGravatar Tom Willemse2020-10-19 09:04:28 -0700
commit6048293876be38c8dd08c5a76e168f06d57ceaf7 (patch)
tree36e584d5ea5d0206be26cc736801b0e1529d30b6 /test
parent5302d5a8aea1267dbdb2646e172e9442daaffb81 (diff)
downloademacs-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-xtest/integration/oni-groovy.bats41
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" ]]
+}