diff options
author | 2020-01-06 20:09:13 -0800 | |
---|---|---|
committer | 2020-01-06 20:09:13 -0800 | |
commit | 0115885ae590135aee236839401b3a981772dae0 (patch) | |
tree | 2c7e0ac11cbbae149d371cb16bcbc078f9fc63b7 /test | |
parent | 39bbfffbd888f28abdb770cfa08308860f4614c8 (diff) | |
download | emacs-config-0115885ae590135aee236839401b3a981772dae0.tar.gz emacs-config-0115885ae590135aee236839401b3a981772dae0.zip |
Automatically load scheme-mode for scsh files
When the interpreter contains scsh, load ‘scheme-mode’.
Diffstat (limited to 'test')
-rw-r--r-- | test/oni-scheme.bats | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/oni-scheme.bats b/test/oni-scheme.bats new file mode 100644 index 0000000..acfa53d --- /dev/null +++ b/test/oni-scheme.bats @@ -0,0 +1,23 @@ +#!/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" ] +} |