diff options
| author | John Wiegley | 2017-11-30 18:37:27 -0800 |
|---|---|---|
| committer | John Wiegley | 2017-11-30 18:37:27 -0800 |
| commit | 7a562f10cbdcf13e1f37a2aa964f63c7f7cdb1a3 (patch) | |
| tree | cc0708580c4a950f0b8f7a8843b897fe471834ab | |
| parent | 9465b915a84a330665e6e2334a8c9635f68caa5e (diff) | |
| download | emacs-7a562f10cbdcf13e1f37a2aa964f63c7f7cdb1a3.tar.gz emacs-7a562f10cbdcf13e1f37a2aa964f63c7f7cdb1a3.zip | |
Add test for use-package-test-normalize/:ensure
| -rw-r--r-- | test/lisp/use-package/use-package-tests.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index 43ecb316aca..e27d7f28851 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el | |||
| @@ -85,6 +85,16 @@ | |||
| 85 | ;; (should (equal (macroexpand (use-package)) | 85 | ;; (should (equal (macroexpand (use-package)) |
| 86 | ;; '()))) | 86 | ;; '()))) |
| 87 | 87 | ||
| 88 | (ert-deftest use-package-test-normalize/:ensure () | ||
| 89 | (flet ((norm (&rest args) | ||
| 90 | (apply #'use-package-normalize/:ensure | ||
| 91 | 'foopkg :ensure args))) | ||
| 92 | (should (equal (norm '(t)) t)) | ||
| 93 | (should (equal (norm '(nil)) nil)) | ||
| 94 | (should (equal (norm '(sym)) 'sym)) | ||
| 95 | (should-error (norm '(1))) | ||
| 96 | (should-error (norm '("Hello"))))) | ||
| 97 | |||
| 88 | (ert-deftest use-package-test/:ensure () | 98 | (ert-deftest use-package-test/:ensure () |
| 89 | (let ((use-package-always-ensure nil)) | 99 | (let ((use-package-always-ensure nil)) |
| 90 | (match-expansion | 100 | (match-expansion |