(should (equal (use-package--normalize-function "Hello") "Hello"))
(should (equal (use-package--normalize-function '(nil . nil)) '(nil . nil))))
-(ert-deftest use-package-test/:disabled ()
+(ert-deftest use-package-test/:disabled-1 ()
(match-expansion
(use-package foo :disabled t)
`()))
-(ert-deftest use-package-test/:preface ()
+(ert-deftest use-package-test/:preface-1 ()
(match-expansion
(use-package foo :preface (t))
`(progn
(eval-and-compile
(t))
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:preface-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :preface (t))
"Cannot load foo: %S" nil
(load "foo" nil t)))
(t))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:preface-3 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo
(init)
(require 'foo nil nil)
(config)
- t)))
+ t))))
+(ert-deftest use-package-test/:preface-4 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo
(config)
t))))))
-(ert-deftest use-package-test/:pin ()
+(ert-deftest use-package-test/:pin-1 ()
(match-expansion
(use-package foo :pin foo)
`(progn
(use-package-pin-package 'foo "foo")
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:pin-2 ()
(match-expansion
(use-package foo :pin "foo")
`(progn
(use-package-pin-package 'foo "foo")
(require 'foo nil nil))))
-(ert-deftest use-package-test/:defer-install ()
- (match-expansion
- (use-package foo :defer-install t)
- `(require 'foo nil nil)))
-
(ert-deftest use-package-test-normalize/:ensure ()
(flet ((norm (&rest args)
(apply #'use-package-normalize/:ensure
(should-error (norm '(1)))
(should-error (norm '("Hello")))))
-(ert-deftest use-package-test/:ensure ()
+(ert-deftest use-package-test/:ensure-1 ()
(let ((use-package-always-ensure nil))
(match-expansion
(use-package foo :ensure t)
`(progn
(use-package-ensure-elpa 'foo 't 'nil)
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-2 ()
(let ((use-package-always-ensure t))
(match-expansion
(use-package foo :ensure t)
`(progn
(use-package-ensure-elpa 'foo 't 'nil)
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-3 ()
(let ((use-package-always-ensure nil))
(match-expansion
(use-package foo :ensure nil)
`(progn
(use-package-ensure-elpa 'foo 'nil 'nil)
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-4 ()
(let ((use-package-always-ensure t))
(match-expansion
(use-package foo :ensure nil)
`(progn
(use-package-ensure-elpa 'foo 'nil 'nil)
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-5 ()
(let ((use-package-always-ensure nil))
(match-expansion
(use-package foo :load-path "foo")
`(progn
(eval-and-compile
(add-to-list 'load-path ,(pred stringp)))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-6 ()
(let ((use-package-always-ensure t))
(match-expansion
(use-package foo :load-path "foo")
`(progn
(eval-and-compile
(add-to-list 'load-path ,(pred stringp)))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-7 ()
(let ((use-package-always-ensure nil))
(match-expansion
(use-package foo :ensure nil :load-path "foo")
(use-package-ensure-elpa 'foo 'nil 'nil)
(eval-and-compile
(add-to-list 'load-path ,(pred stringp)))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-8 ()
(let ((use-package-always-ensure t))
(match-expansion
(use-package foo :ensure nil :load-path "foo")
(use-package-ensure-elpa 'foo 'nil 'nil)
(eval-and-compile
(add-to-list 'load-path ,(pred stringp)))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-9 ()
(let ((use-package-always-ensure nil))
(match-expansion
(use-package foo :ensure t :load-path "foo")
(use-package-ensure-elpa 'foo 't 'nil)
(eval-and-compile
(add-to-list 'load-path ,(pred stringp)))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-10 ()
(let ((use-package-always-ensure t))
(match-expansion
(use-package foo :ensure t :load-path "foo")
(use-package-ensure-elpa 'foo 't 'nil)
(eval-and-compile
(add-to-list 'load-path ,(pred stringp)))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:ensure-11 ()
(let (tried-to-install)
(flet ((use-package-ensure-elpa
(name ensure state &optional no-refresh)
(use-package foo :ensure t)
(should (eq tried-to-install 'foo)))))
-(ert-deftest use-package-test/:if ()
+(ert-deftest use-package-test/:if-1 ()
(match-expansion
(use-package foo :if t)
`(when t
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:if-2 ()
(match-expansion
(use-package foo :if (and t t))
`(when (and t t)
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:if-3 ()
(match-expansion
(use-package foo :if nil)
`(when nil
(require 'foo nil nil))))
-(ert-deftest use-package-test/:when ()
+(ert-deftest use-package-test/:when-1 ()
(match-expansion
(use-package foo :when t)
`(when t
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:when-2 ()
(match-expansion
(use-package foo :when (and t t))
`(when (and t t)
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:when-3 ()
(match-expansion
(use-package foo :when nil)
`(when nil
(require 'foo nil nil))))
-(ert-deftest use-package-test/:unless ()
+(ert-deftest use-package-test/:unless-1 ()
(match-expansion
(use-package foo :unless t)
`(when (not t)
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:unless-2 ()
(match-expansion
(use-package foo :unless (and t t))
`(when (not (and t t))
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:unless-3 ()
(match-expansion
(use-package foo :unless nil)
`(unless nil
(require 'foo nil nil))))
-(ert-deftest use-package-test/:requires ()
+(ert-deftest use-package-test/:requires-1 ()
(match-expansion
(use-package foo :requires bar)
`(when (featurep 'bar)
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:requires-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :requires bar)
(with-demoted-errors
"Cannot load foo: %S" nil
(load "foo" nil t))))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:requires-3 ()
(match-expansion
(use-package foo :requires (bar quux))
`(when (not (member nil (mapcar #'featurep '(bar quux))))
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:requires-4 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :requires bar)
(load "foo" nil t))))
(require 'foo nil nil)))))
-(ert-deftest use-package-test/:load-path ()
+(ert-deftest use-package-test/:load-path-1 ()
(match-expansion
(use-package foo :load-path "bar")
`(progn
#'string=
(expand-file-name
"bar" user-emacs-directory)))))
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:load-path-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :load-path "bar")
(eval-when-compile
(with-demoted-errors "Cannot load foo: %S" nil
(load "foo" nil t))))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:load-path-3 ()
(match-expansion
(use-package foo :load-path ("bar" "quux"))
`(progn
#'string=
(expand-file-name
"quux" user-emacs-directory)))))
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:load-path-4 ()
(match-expansion
(use-package foo :load-path (lambda () (list "bar" "quux")))
`(progn
"quux" user-emacs-directory)))))
(require 'foo nil nil))))
-(ert-deftest use-package-test/:no-require ()
+(ert-deftest use-package-test/:no-require-1 ()
(match-expansion
(use-package foo :no-require t)
- `nil)
+ `nil))
+(ert-deftest use-package-test/:no-require-2 ()
(match-expansion
(use-package foo :no-require t :config (config))
`(progn
(config)
- t))
+ t)))
+(ert-deftest use-package-test/:no-require-3 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :no-require t)
(should-error (norm '("foo" . 99)))
(should-error (norm '(99 . sym)))))
-(ert-deftest use-package-test/:bind ()
+(ert-deftest use-package-test/:bind-1 ()
(match-expansion
(use-package foo :bind ("C-k" . key))
`(progn
(ignore
(bind-keys :package foo ("C-k" . key))))))
-(ert-deftest use-package-test/:bind* ()
+(ert-deftest use-package-test/:bind*-1 ()
(match-expansion
(use-package foo :bind* ("C-k" . key))
`(progn
(ignore
(bind-keys* :package foo ("C-k" . key))))))
-(ert-deftest use-package-test/:bind-keymap ()
+(ert-deftest use-package-test/:bind-keymap-1 ()
(match-expansion
(use-package foo :bind-keymap ("C-k" . key))
`(ignore
(interactive)
(use-package-autoload-keymap 'key 'foo nil))))))
-(ert-deftest use-package-test/:bind-keymap* ()
+(ert-deftest use-package-test/:bind-keymap*-1 ()
(match-expansion
(use-package foo :bind-keymap* ("C-k" . key))
`(ignore
(interactive)
(use-package-autoload-keymap 'key 'foo t))))))
-(ert-deftest use-package-test/:interpreter ()
+(ert-deftest use-package-test/:interpreter-1 ()
(match-expansion
(use-package foo :interpreter "interp")
`(progn
(add-to-list 'interpreter-mode-alist '("interp" . foo))
(unless (fboundp 'foo)
- (autoload #'foo "foo" nil t))))
+ (autoload #'foo "foo" nil t)))))
+(ert-deftest use-package-test/:interpreter-2 ()
(match-expansion
(use-package foo :interpreter ("interp" . fun))
`(progn
(should (equal (norm '((".foo" . foo) (".bar" . bar)))
'((".foo" . foo) (".bar" . bar))))))
-(ert-deftest use-package-test/:mode ()
+(ert-deftest use-package-test/:mode-1 ()
(match-expansion
(use-package foo :mode "interp")
`(progn
(add-to-list 'auto-mode-alist '("interp" . foo))
(unless (fboundp 'foo)
- (autoload #'foo "foo" nil t))))
+ (autoload #'foo "foo" nil t)))))
+(ert-deftest use-package-test/:mode-2 ()
(match-expansion
(use-package foo :mode ("interp" . fun))
`(progn
(unless (fboundp 'fun)
(autoload #'fun "foo" nil t)))))
-(ert-deftest use-package-test/:magic ()
+(ert-deftest use-package-test/:magic-1 ()
(match-expansion
(use-package foo :magic "interp")
`(progn
(add-to-list 'magic-mode-alist '("interp" . foo))
(unless (fboundp 'foo)
- (autoload #'foo "foo" nil t))))
+ (autoload #'foo "foo" nil t)))))
+(ert-deftest use-package-test/:magic-2 ()
(match-expansion
(use-package foo :magic ("interp" . fun))
`(progn
(unless (fboundp 'fun)
(autoload #'fun "foo" nil t)))))
-(ert-deftest use-package-test/:magic-fallback ()
+(ert-deftest use-package-test/:magic-fallback-1 ()
(match-expansion
(use-package foo :magic-fallback "interp")
`(progn
(add-to-list 'magic-fallback-mode-alist '("interp" . foo))
(unless (fboundp 'foo)
- (autoload #'foo "foo" nil t))))
+ (autoload #'foo "foo" nil t)))))
+(ert-deftest use-package-test/:magic-fallback-2 ()
(match-expansion
(use-package foo :magic-fallback ("interp" . fun))
`(progn
(unless (fboundp 'fun)
(autoload #'fun "foo" nil t)))))
-(ert-deftest use-package-test/:commands ()
+(ert-deftest use-package-test/:commands-1 ()
(match-expansion
(use-package foo :commands bar)
`(unless (fboundp 'bar)
- (autoload #'bar "foo" nil t)))
+ (autoload #'bar "foo" nil t))))
+(ert-deftest use-package-test/:commands-2 ()
(match-expansion
(use-package foo :commands (bar quux))
`(progn
(unless (fboundp 'bar)
(autoload #'bar "foo" nil t))
(unless (fboundp 'quux)
- (autoload #'quux "foo" nil t))))
+ (autoload #'quux "foo" nil t)))))
+(ert-deftest use-package-test/:commands-3 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :commands (bar quux))
(eval-when-compile
(declare-function quux "foo"))))))
-(ert-deftest use-package-test/:defines ()
+(ert-deftest use-package-test/:defines-1 ()
(match-expansion
(use-package foo :defines bar)
- `(require 'foo nil nil))
+ `(require 'foo nil nil)))
+(ert-deftest use-package-test/:defines-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :defines bar)
(load "foo" nil t))))
(require 'foo nil nil)))))
-(ert-deftest use-package-test/:functions ()
+(ert-deftest use-package-test/:functions-1 ()
(match-expansion
(use-package foo :functions bar)
- `(require 'foo nil nil))
+ `(require 'foo nil nil)))
+(ert-deftest use-package-test/:functions-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :functions bar)
(with-demoted-errors
"Cannot load foo: %S" nil
(load "foo" nil t))))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:functions-3 ()
(match-expansion
(use-package foo :defer t :functions bar)
- `nil)
+ `nil))
+(ert-deftest use-package-test/:functions-4 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :defer t :functions bar)
(declare-function bar "foo")
(eval-when-compile
(with-demoted-errors "Cannot load foo: %S" nil
- (load "foo" nil t))))))
+ (load "foo" nil t)))))))
+(ert-deftest use-package-test/:functions-5 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :defer t :config (config) :functions bar)
(config)
t))))))
-(ert-deftest use-package-test/:defer ()
+(ert-deftest use-package-test/:defer-1 ()
(match-expansion
(use-package foo)
- `(require 'foo nil nil))
+ `(require 'foo nil nil)))
+(ert-deftest use-package-test/:defer-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo)
(eval-when-compile
(with-demoted-errors "Cannot load foo: %S" nil
(load "foo" nil t))))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:defer-3 ()
(match-expansion
(use-package foo :defer t)
- `nil)
+ `nil))
+(ert-deftest use-package-test/:defer-4 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :defer t)
(should (equal (norm '(((bar1 bar2) . baz) ((quux1 quux2) . bow)))
'(((bar1 bar2) . baz) ((quux1 quux2) . bow))))))
-(ert-deftest use-package-test/:hook ()
+(ert-deftest use-package-test/:hook-1 ()
(let ((byte-compile-current-file t))
(should
(equal
;; '((foo bar baz))))
))
-(ert-deftest use-package-test/:custom ()
+(ert-deftest use-package-test/:custom-1 ()
(match-expansion
(use-package foo :custom (foo bar))
`(progn
(customize-set-variable 'foo bar "Customized with use-package foo")
(require 'foo nil nil))))
-(ert-deftest use-package-test/:custom-face ()
+(ert-deftest use-package-test/:custom-face-1 ()
(match-expansion
(use-package foo :custom-face (foo ((t (:background "#e4edfc")))))
`(progn
(custom-set-faces '(foo ((t (:background "#e4edfc")))))
(require 'foo nil nil))))
-(ert-deftest use-package-test/:init ()
+(ert-deftest use-package-test/:init-1 ()
(match-expansion
(use-package foo :init (init))
`(progn
(init)
- (require 'foo nil nil)))
+ (require 'foo nil nil))))
+(ert-deftest use-package-test/:init-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :init (init))
(init)
(require 'foo nil nil)))))
-(ert-deftest use-package-test/:after ()
+(ert-deftest use-package-test/:after-1 ()
(match-expansion
(use-package foo :after bar)
`(eval-after-load 'bar
- '(require 'foo nil nil)))
+ '(require 'foo nil nil))))
+(ert-deftest use-package-test/:after-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :after bar)
(with-demoted-errors "Cannot load foo: %S" nil
(load "foo" nil t))))
(eval-after-load 'bar
- '(require 'foo nil nil)))))
+ '(require 'foo nil nil))))))
+(ert-deftest use-package-test/:after-3 ()
(match-expansion
(use-package foo :after (bar quux))
`(eval-after-load 'quux
'(eval-after-load 'bar
- '(require 'foo nil nil))))
+ '(require 'foo nil nil)))))
+(ert-deftest use-package-test/:after-4 ()
(match-expansion
(use-package foo :after (:all bar quux))
`(eval-after-load 'quux
'(eval-after-load 'bar
- '(require 'foo nil nil))))
+ '(require 'foo nil nil)))))
+(ert-deftest use-package-test/:after-5 ()
(match-expansion
(use-package foo :after (:any bar quux))
`(lexical-let ,_
(eval-after-load 'bar
`(funcall ,_))
(eval-after-load 'quux
- `(funcall ,_))))))
+ `(funcall ,_)))))))
+(ert-deftest use-package-test/:after-6 ()
(match-expansion
(use-package foo :after (:all (:any bar quux) bow))
`(lexical-let ,_
(eval-after-load 'bar
`(funcall ,_))
(eval-after-load 'quux
- `(funcall ,_)))))))
+ `(funcall ,_))))))))
+(ert-deftest use-package-test/:after-7 ()
(match-expansion
(use-package foo :after (:any (:all bar quux) bow))
`(lexical-let ,_
'(eval-after-load 'bar
`(funcall ,_)))
(eval-after-load 'bow
- `(funcall ,_))))))
+ `(funcall ,_)))))))
+(ert-deftest use-package-test/:after-8 ()
(match-expansion
(use-package foo :after (:all (:any bar quux) (:any bow baz)))
`(lexical-let ,_
(eval-after-load 'bar
`(funcall ,_))
(eval-after-load 'quux
- `(funcall ,_))))))))
+ `(funcall ,_)))))))))
+(ert-deftest use-package-test/:after-9 ()
(match-expansion
(use-package foo :after (:any (:all bar quux) (:all bow baz)))
`(lexical-let ,_
`(funcall ,_)))
(eval-after-load 'baz
'(eval-after-load 'bow
- `(funcall ,_)))))))
+ `(funcall ,_))))))))
+(ert-deftest use-package-test/:after-10 ()
(match-expansion
(use-package foo :after (:any (:all bar quux) (:any bow baz)))
`(lexical-let ,_
(eval-after-load 'baz
`(funcall ,_))))))))
-(ert-deftest use-package-test/:demand ()
+(ert-deftest use-package-test/:demand-1 ()
(match-expansion
(use-package foo :demand t)
- `(require 'foo nil nil))
+ `(require 'foo nil nil)))
+(ert-deftest use-package-test/:demand-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :demand t)
(eval-when-compile
(with-demoted-errors "Cannot load foo: %S" nil
(load "foo" nil t))))
- (require 'foo nil nil))))
+ (require 'foo nil nil)))))
+(ert-deftest use-package-test/:demand-3 ()
(match-expansion
(use-package foo :demand t :config (config))
`(progn
(require 'foo nil nil)
(config)
- t))
+ t)))
+(ert-deftest use-package-test/:demand-4 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :demand t :config (config))
(load "foo" nil t))))
(require 'foo nil nil)
(config)
- t)))
+ t))))
+(ert-deftest use-package-test/:demand-5 ()
;; #529 - :demand should not override an explicit use of :after
(match-expansion
(use-package foo :demand t :after bar)
`(eval-after-load 'bar
- '(require 'foo nil nil)))
+ '(require 'foo nil nil))))
+(ert-deftest use-package-test/:demand-6 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :demand t :after bar)
(with-demoted-errors "Cannot load foo: %S" nil
(load "foo" nil t))))
(eval-after-load 'bar
- '(require 'foo nil nil)))))
+ '(require 'foo nil nil))))))
+(ert-deftest use-package-test/:demand-7 ()
(match-expansion
(use-package counsel
:load-path "site-lisp/swiper"
("C-*" . counsel-org-agenda-headlines)
("M-x" . counsel-M-x))))))))
-(ert-deftest use-package-test/:config ()
+(ert-deftest use-package-test/:config-1 ()
(match-expansion
(use-package foo :config (config))
`(progn
(require 'foo nil nil)
(config)
- t))
+ t)))
+(ert-deftest use-package-test/:config-2 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :config (config))
(load "foo" nil t))))
(require 'foo nil nil)
(config)
- t)))
+ t))))
+(ert-deftest use-package-test/:config-3 ()
(match-expansion
(use-package foo :defer t :config (config))
`(eval-after-load 'foo
'(progn
(config)
- t)))
+ t))))
+(ert-deftest use-package-test/:config-4 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package foo :defer t :config (config))
(should (equal (use-package-normalize-diminish 'foopkg :diminish '(foo . "bar"))
'((foo . "bar")))))
-(ert-deftest use-package-test/:diminish ()
+(ert-deftest use-package-test/:diminish-1 ()
(match-expansion
(use-package foo :diminish nil)
`(progn
(require 'foo nil nil)
(if (fboundp 'diminish)
- (diminish 'foo-mode))))
+ (diminish 'foo-mode)))))
+(ert-deftest use-package-test/:diminish-2 ()
(match-expansion
(use-package foo :diminish bar)
`(progn
(require 'foo nil nil)
(if (fboundp 'diminish)
- (diminish 'bar))))
+ (diminish 'bar)))))
+(ert-deftest use-package-test/:diminish-3 ()
(match-expansion
(use-package foo :diminish "bar")
`(progn
(require 'foo nil nil)
(if (fboundp 'diminish)
- (diminish 'foo-mode "bar"))))
-
+ (diminish 'foo-mode "bar")))))
+(ert-deftest use-package-test/:diminish-4 ()
(match-expansion
(use-package foo :diminish (foo . "bar"))
`(progn
`((a-mode nil foo) (b-mode " b" foo))))
(should-error (use-package-normalize/:delight 'foo :delight '((:eval 1)))))
-(ert-deftest use-package-test/:delight ()
+(ert-deftest use-package-test/:delight-1 ()
(match-expansion
(use-package foo :delight)
`(progn
(require 'foo nil nil)
(if (fboundp 'delight)
- (delight '((foo-mode nil foo))))))
+ (delight '((foo-mode nil foo)))))))
+(ert-deftest use-package-test/:delight-2 ()
(should-error
(match-expansion
(use-package foo :delight nil)
`(progn
(require 'foo nil nil)
(if (fboundp 'diminish)
- (diminish 'foo-mode)))))
+ (diminish 'foo-mode))))))
+(ert-deftest use-package-test/:delight-3 ()
(match-expansion
(use-package foo :delight bar)
`(progn
(require 'foo nil nil)
(if (fboundp 'delight)
- (delight '((bar nil foo))))))
+ (delight '((bar nil foo)))))))
+(ert-deftest use-package-test/:delight-4 ()
(match-expansion
(use-package foo :delight "bar")
`(progn
(require 'foo nil nil)
(if (fboundp 'delight)
- (delight '((foo-mode "bar" foo))))))
+ (delight '((foo-mode "bar" foo)))))))
+(ert-deftest use-package-test/:delight-5 ()
(should-error
(match-expansion
(use-package foo :delight (foo . "bar"))
`(progn
(require 'foo nil nil)
(if (fboundp 'diminish)
- (diminish 'foo "bar")))))
+ (diminish 'foo "bar"))))))
+(ert-deftest use-package-test/:delight-6 ()
(match-expansion
(use-package foo :delight (foo "bar"))
`(progn