1
0
Fork 0
emacs-config/test/oni-scheme.bats
Tom Willemse 0115885ae5 Automatically load scheme-mode for scsh files
When the interpreter contains scsh, load ‘scheme-mode’.
2020-01-06 20:09:13 -08:00

23 lines
548 B
Bash

#!/usr/bin/env bats
@test "Opening a scheme file loads oni-scheme" {
run emacs -batch -l package -f package-initialize \
-visit test.scm \
-eval "(prin1 (featurep 'oni-scheme))"
[ "$output" = "t" ]
}
@test "Opening a file with the SCSH interpreter loads scheme-mode" {
filename="$(mktemp)"
echo "#!/usr/bin/scsh -s" > "$filename"
run emacs -batch -l package -f package-initialize \
-visit "$filename" \
-eval "(prin1 major-mode)"
rm "$filename"
[ "$output" = "scheme-mode" ]
}