Add makefile to launch tests and dummy tests

Using ERT
This commit is contained in:
syl20bnr 2014-11-23 10:23:40 -05:00
parent 0fd950f6ae
commit 570033214d
4 changed files with 51 additions and 1 deletions

6
core/Makefile Normal file
View File

@ -0,0 +1,6 @@
all: test
test:
@emacs -batch -l ert -l ~/.emacs.d/core/test/config-system-test.el -f ert-run-tests-batch-and-exit
.PHONY: test

View File

@ -0,0 +1,37 @@
(ert-deftest dummy-test ()
"dummy"
(should (string-equal "" "")))
(ert-deftest dummy-test1 ()
"dummy"
(should (string-equal "" "")))
(ert-deftest dummy-test2 ()
"dummy"
(should (string-equal "" "")))
(ert-deftest dummy-test3 ()
"dummy"
(should (string-equal "" "")))
(ert-deftest dummy-test4 ()
"dummy"
(should (string-equal "" "")))
(ert-deftest dummy-test5 ()
"dummy"
(should (string-equal "" "")))
(ert-deftest dummy-test6 ()
"dummy"
(should (string-equal "" "")))
(ert-deftest dummy-test7 ()
"dummy"
(should (string-equal "" "")))
(ert-deftest dummy-test8 ()
"dummy"
(should (string-equal "" "")))

View File

@ -639,3 +639,10 @@ otherwise it is scaled down."
(interactive)
(if (y-or-n-p (format "Erase content of buffer %s ? " (current-buffer)))
(erase-buffer)))
(defun spacemacs/ert-run-tests-buffer ()
"Run all the tests in the current buffer."
(interactive)
(save-buffer)
(load-file (buffer-file-name))
(ert t))

View File

@ -160,5 +160,5 @@
"mD" 'elisp-slime-nav-describe-elisp-thing-at-point
"mg" 'elisp-slime-nav-find-elisp-thing-at-point
"mhv" 'describe-variable
"mta" (lambda () (interactive) (ert t))
"mta" 'spacemacs/ert-run-tests-buffer
"mtf" 'ert)