1
0
Fork 0
emacs-config/test/integration/oni-groovy.bats
Tom Willemse 6048293876 Add jenkinsfile-mode
Both ‘Jenkinsfile’ files and ‘*.pipeline’ files should be using
‘jenkinsfile-mode’.
2020-10-19 09:04:28 -07:00

41 lines
974 B
Bash
Executable file

#!/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" ]]
}