mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 06:20:43 -08:00
Add two new tests
This commit is contained in:
parent
3ea2d34219
commit
c3b9cc2403
1 changed files with 30 additions and 0 deletions
|
|
@ -165,10 +165,40 @@
|
|||
;; (should (equal (macroexpand (use-package))
|
||||
;; '())))
|
||||
|
||||
(ert-deftest use-package-test-normalize/:hook ()
|
||||
(should-error (use-package-normalize/:hook 'foopkg :hook nil))
|
||||
(should (equal (use-package-normalize/:hook 'foopkg :hook '(bar))
|
||||
'((bar . foopkg))))
|
||||
(should (equal (use-package-normalize/:hook 'foopkg :hook '((bar . baz)))
|
||||
'((bar . baz))))
|
||||
(should (equal (use-package-normalize/:hook 'foopkg :hook '(((bar baz) . quux)))
|
||||
'(((bar baz) . quux))))
|
||||
(should (equal (use-package-normalize/:hook 'foopkg :hook '(bar baz))
|
||||
'(((bar baz) . foopkg))))
|
||||
(should (equal (use-package-normalize/:hook 'foopkg :hook '((bar baz) (quux bow)))
|
||||
'(((bar baz) . foopkg) ((quux bow) . foopkg))))
|
||||
(should (equal (use-package-normalize/:hook 'foopkg :hook '((bar . baz) (quux . bow)))
|
||||
'((bar . baz) (quux . bow))))
|
||||
(should (equal (use-package-normalize/:hook 'foopkg :hook '(((bar1 bar2) . baz)
|
||||
((quux1 quux2) . bow)))
|
||||
'(((bar1 bar2) . baz)
|
||||
((quux1 quux2) . bow)))))
|
||||
|
||||
;; (ert-deftest use-package-test/:hook ()
|
||||
;; (should (equal (macroexpand (use-package))
|
||||
;; '())))
|
||||
|
||||
(ert-deftest use-package-test-normalize/:custom ()
|
||||
(should-error (use-package-normalize/:custom 'foopkg :custom nil))
|
||||
(should-error (use-package-normalize/:custom 'foopkg :custom '(bar)))
|
||||
;; (should-error (use-package-normalize/:custom 'foopkg :custom '((foo bar baz quux))))
|
||||
(should (equal (use-package-normalize/:custom 'foopkg :custom '(foo bar))
|
||||
'((foo bar))))
|
||||
;; (should-error (use-package-normalize/:custom 'foopkg :custom '(foo bar baz)))
|
||||
;; (should (equal (use-package-normalize/:custom 'foopkg :custom '(foo bar "baz"))
|
||||
;; '((foo bar baz))))
|
||||
)
|
||||
|
||||
;; (ert-deftest use-package-test/:custom ()
|
||||
;; (should (equal (macroexpand (use-package))
|
||||
;; '())))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue