mirror of
https://github.com/vale981/boon
synced 2025-03-05 09:31:43 -05:00
add tests
This commit is contained in:
parent
21ed302eb1
commit
12198420e4
2 changed files with 33 additions and 0 deletions
11
Makefile
11
Makefile
|
@ -1,3 +1,5 @@
|
|||
emacs ?= emacs
|
||||
|
||||
cheat.pdf: cheat-sheet.hs
|
||||
ghc --make cheat-sheet.hs -main-is CC
|
||||
./cheat-sheet
|
||||
|
@ -5,3 +7,12 @@ cheat.pdf: cheat-sheet.hs
|
|||
xelatex qwerty.tex
|
||||
./cheat-sheet
|
||||
xelatex qwerty.tex
|
||||
|
||||
test:
|
||||
$(emacs) -batch --script boon-test.el
|
||||
|
||||
clean:
|
||||
rm -f *.elc
|
||||
|
||||
.PHONY: all clean test
|
||||
|
||||
|
|
22
boon-test.el
Normal file
22
boon-test.el
Normal file
|
@ -0,0 +1,22 @@
|
|||
(package-initialize t)
|
||||
(package-activate 'multiple-cursors)
|
||||
(package-activate 'dash)
|
||||
(package-activate 'expand-region)
|
||||
|
||||
(add-to-list 'load-path default-directory)
|
||||
|
||||
(ert-deftest boon-open-next-line-and-insert-at-buffer-end ()
|
||||
(should (string=
|
||||
"first-line\n\n"
|
||||
(with-temp-buffer
|
||||
(insert "first-line")
|
||||
(goto-char 5)
|
||||
(boon-open-next-line-and-insert)
|
||||
(buffer-substring-no-properties 1 (point-max))))))
|
||||
|
||||
(setq byte-compile-error-on-warn t)
|
||||
|
||||
(and
|
||||
(byte-compile-file "boon.el")
|
||||
(require 'boon)
|
||||
(ert-run-tests-batch-and-exit))
|
Loading…
Add table
Reference in a new issue