From e0e44f3da96c90fd8ce8d78dbacc9cd1887b46e2 Mon Sep 17 00:00:00 2001 From: Peter Badida Date: Thu, 16 Nov 2023 17:50:22 +0100 Subject: [PATCH] [ADD] Sample test case --- Makefile | 7 +++++++ typewriter-roll-mode-tests.el | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Makefile create mode 100644 typewriter-roll-mode-tests.el diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..97fca66 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +EMACS := emacs + +all: + $(EMACS) --batch --quick \ + --directory . \ + --load typewriter-roll-mode-tests.el \ + --funcall ert-run-tests-batch diff --git a/typewriter-roll-mode-tests.el b/typewriter-roll-mode-tests.el new file mode 100644 index 0000000..434a0f7 --- /dev/null +++ b/typewriter-roll-mode-tests.el @@ -0,0 +1,17 @@ +;;; typewriter-roll-mode-tests.el -- tests for typewriter-roll-mode + +;;; Code: + +(require 'ert) +(require 'typewriter-roll-mode) + +(ert-deftest trm-backspace () + (should (not + (let ((this-command "hello")) + (typewriter-roll--is-backspace)))) + (should (let ((this-command 'delete-backward-char)) + (typewriter-roll--is-backspace)))) + +(provide 'typewriter-roll-mode-tests) + +;;; typewriter-roll-mode-tests.el ends here