2020-04-08 06:40:06 +02:00
|
|
|
|
(require 'oni-bats)
|
|
|
|
|
|
2020-01-08 02:17:35 +01:00
|
|
|
|
(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)))))
|
2020-04-08 06:40:06 +02:00
|
|
|
|
|
|
|
|
|
(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)))
|