1
0
Fork 0
emacs-config/test/integration/oni-scheme.bats
Tom Willemse dab6d0bd70 [oni-scheme] Print output of integration tests for debugging
In bats, when you print to stdout during a test, if the test fails bats will
show the output that was generated. If everything succeeds it hides the output.
2021-04-08 16:04:47 -07:00

27 lines
586 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" ]
}