mirror of
https://codeberg.org/scip/autoscratch.git
synced 2025-12-16 20:10:57 +01:00
more tests
This commit is contained in:
@@ -33,10 +33,17 @@
|
||||
(require 'ert)
|
||||
|
||||
(ert-deftest switch-text ()
|
||||
;; start with empty *scratch*
|
||||
(autoscratch-buffer)
|
||||
(should (string= major-mode "autoscratch-mode"))
|
||||
;; should rename current scratch, create a new scratch in the
|
||||
;; background and enable the correct mode
|
||||
(insert "t")
|
||||
(autoscratch--look-for-triggers nil)
|
||||
(should (string= major-mode "text-mode")))
|
||||
(should (string= major-mode "text-mode"))
|
||||
;; now we should be back to the previously "forked" scratch
|
||||
(kill-buffer)
|
||||
(should (string= major-mode "autoscratch-mode")))
|
||||
|
||||
(provide 'trigger-tests)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user