aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGravatar Tom Willemse2020-04-07 21:40:06 -0700
committerGravatar Tom Willemse2020-04-07 21:40:06 -0700
commita8b95ba858abd996e8cea29a952a75c152d8802c (patch)
tree5f30013ec0d816b4da23a3cd52d04905a7116d8b /test
parent23a23d3c1b85b0ae5334e4571aad2648e6fdb0b5 (diff)
downloademacs-config-a8b95ba858abd996e8cea29a952a75c152d8802c.tar.gz
emacs-config-a8b95ba858abd996e8cea29a952a75c152d8802c.zip
Disable ‘shfmt-on-save-mode’ for ‘bats-mode’ buffers
Diffstat (limited to 'test')
-rw-r--r--test/oni-bats-test.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/oni-bats-test.el b/test/oni-bats-test.el
index 7414dc4..3e32460 100644
--- a/test/oni-bats-test.el
+++ b/test/oni-bats-test.el
@@ -1,3 +1,5 @@
+(require 'oni-bats)
+
(ert-deftest oni-bats-test-auto-insert ()
"Test that ‘auto-insert’ inserts the proper interpreter."
(with-temp-buffer
@@ -5,3 +7,9 @@
(let ((auto-insert-query nil))
(auto-insert))
(should (string= "#!/usr/bin/env bats\n\n" (buffer-string)))))
+
+(ert-deftest oni-bats-has-shfmt-on-save-mode-disabled ()
+ "Test that ‘shfmt-on-save-mode’ is disabled in a ‘bats-mode’ buffer."
+ (with-temp-buffer
+ (bats-mode)
+ (should-not shfmt-on-save-mode)))