Tom Willemse
9d51fae47b
All of the other tests already check that the output ends with the expected output and isn’t exactly equal to it. This is because I don’t have enough control over (or don’t know enough about) the output Emacs and other packages generate. In order to prevent false-positives from happening as is happening with ‘scheme-mode’, I don’t check what’s before the output I expect. The false-positive that’s happening with ‘scheme-mode’ is an issue that it seems like ‘geiser’ has started complaining that it can’t find ‘guile’, which is expected.
27 lines
594 B
Bash
Executable file
27 lines
594 B
Bash
Executable file
#!/usr/bin/env bats
|
|
|
|
@test "Opening a .scm file loads oni-scheme" {
|
|
run emacs -batch -l package -f package-initialize \
|
|
-visit test.scm \
|
|
-eval "(prin1 (featurep 'oni-scheme))"
|
|
|
|
echo "$output"
|
|
|
|
[[ "$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"
|
|
|
|
echo "$output"
|
|
|
|
[[ "$output" == *"scheme-mode" ]]
|
|
}
|