Skip to content

Commit

Permalink
[ADD] Sample test case
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyWeeUsr committed Nov 16, 2023
1 parent 3114d05 commit e0e44f3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
EMACS := emacs

all:
$(EMACS) --batch --quick \
--directory . \
--load typewriter-roll-mode-tests.el \
--funcall ert-run-tests-batch
17 changes: 17 additions & 0 deletions typewriter-roll-mode-tests.el
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e0e44f3

Please sign in to comment.