1
0
Fork 0
emacs-config/test/integration/oni-groovy.bats

52 lines
1.2 KiB
Text
Raw Permalink Normal View History

#!/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" ]]
}
2020-10-31 02:23:10 +01:00
@test "Groovy has slashy string support in Embrace" {
run emacs -batch -l package -f package-initialize -l embrace \
-visit "test.groovy" \
-eval "(prin1 (not (null (alist-get ?/ embrace--pair-list))))"
echo "$output"
[[ "$output" == *"t" ]]
}