From 704207e3071223f3ca3ace6617bb5afa71a7e43f Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Wed, 19 Jul 2017 11:25:57 +0200 Subject: [PATCH] more tests --- test/autoscratch-mode-tests.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/autoscratch-mode-tests.el b/test/autoscratch-mode-tests.el index 824c788..b7f60d5 100644 --- a/test/autoscratch-mode-tests.el +++ b/test/autoscratch-mode-tests.el @@ -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)