blob: 3e324606107a3f74158ec3d7f7691cf6c0bc4a70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
(require 'oni-bats)
(ert-deftest oni-bats-test-auto-insert ()
"Test that ‘auto-insert’ inserts the proper interpreter."
(with-temp-buffer
(bats-mode)
(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)))
|