2020-01-07 05:09:13 +01:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
2020-01-09 01:49:02 +01:00
|
|
|
@test "Opening a .scm file loads oni-scheme" {
|
2020-01-07 05:09:13 +01:00
|
|
|
run emacs -batch -l package -f package-initialize \
|
|
|
|
-visit test.scm \
|
|
|
|
-eval "(prin1 (featurep 'oni-scheme))"
|
|
|
|
|
2021-04-09 01:04:47 +02:00
|
|
|
echo "$output"
|
|
|
|
|
2020-01-07 05:09:13 +01:00
|
|
|
[ "$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"
|
|
|
|
|
2021-04-09 01:04:47 +02:00
|
|
|
echo "$output"
|
|
|
|
|
2020-01-07 05:09:13 +01:00
|
|
|
[ "$output" = "scheme-mode" ]
|
|
|
|
}
|