]> git.eshelyaron.com Git - emacs.git/commitdiff
Add test for use-package-test-normalize/:ensure
authorJohn Wiegley <johnw@newartisans.com>
Fri, 1 Dec 2017 02:37:27 +0000 (18:37 -0800)
committerJohn Wiegley <johnw@newartisans.com>
Fri, 1 Dec 2017 02:37:27 +0000 (18:37 -0800)
test/lisp/use-package/use-package-tests.el

index 43ecb316aca4e2bcd527bdb652e455356f42f250..e27d7f288514c0c3959ec8aeb1b1fd21106929f8 100644 (file)
 ;;   (should (equal (macroexpand (use-package))
 ;;                  '())))
 
+(ert-deftest use-package-test-normalize/:ensure ()
+  (flet ((norm (&rest args)
+               (apply #'use-package-normalize/:ensure
+                      'foopkg :ensure args)))
+    (should (equal (norm '(t)) t))
+    (should (equal (norm '(nil)) nil))
+    (should (equal (norm '(sym)) 'sym))
+    (should-error (norm '(1)))
+    (should-error (norm '("Hello")))))
+
 (ert-deftest use-package-test/:ensure ()
   (let ((use-package-always-ensure nil))
     (match-expansion