;; (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))
;; '())))