aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/automated/subr-tests.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/automated/subr-tests.el b/test/automated/subr-tests.el
index 28a423f5ee8..85d5d112d9e 100644
--- a/test/automated/subr-tests.el
+++ b/test/automated/subr-tests.el
@@ -82,5 +82,19 @@
82 (should (string-greaterp 'acb 'abc)) 82 (should (string-greaterp 'acb 'abc))
83 (should (string-greaterp "acb" 'abc))) 83 (should (string-greaterp "acb" 'abc)))
84 84
85(ert-deftest subr-test-when ()
86 (should (equal (when t 1) 1))
87 (should (equal (when t 2) 2))
88 (should (equal (when nil 1) nil))
89 (should (equal (when nil 2) nil))
90 (should (equal (when t 'x 1) 1))
91 (should (equal (when t 'x 2) 2))
92 (should (equal (when nil 'x 1) nil))
93 (should (equal (when nil 'x 2) nil))
94 (should (equal (macroexpand-all '(when a b))
95 '(if a b)))
96 (should (equal (macroexpand-all '(when a b c d))
97 '(if a (progn b c d)))))
98
85(provide 'subr-tests) 99(provide 'subr-tests)
86;;; subr-tests.el ends here 100;;; subr-tests.el ends here