aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/oni-scheme.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/oni-scheme.bats')
-rw-r--r--test/integration/oni-scheme.bats23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/integration/oni-scheme.bats b/test/integration/oni-scheme.bats
new file mode 100644
index 0000000..acfa53d
--- /dev/null
+++ b/test/integration/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" ]
+}