51 lines
1.2 KiB
Bash
Executable file
51 lines
1.2 KiB
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" ]]
|
|
}
|
|
|
|
@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" ]]
|
|
}
|