diff options
| author | John Wiegley | 2017-12-01 11:30:11 -0800 |
|---|---|---|
| committer | John Wiegley | 2017-12-01 11:30:11 -0800 |
| commit | 09be976c1852fa5d36fe26794c43ad48a4ea12ee (patch) | |
| tree | c4c22034eb1f15554aee4089ca850946ae58899e /test | |
| parent | 9e8e9aa4eed75b23231f8593d57c257be92cda49 (diff) | |
| download | emacs-09be976c1852fa5d36fe26794c43ad48a4ea12ee.tar.gz emacs-09be976c1852fa5d36fe26794c43ad48a4ea12ee.zip | |
:demand should not override an explicit use of :after
Fixes https://github.com/jwiegley/use-package/issues/529
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/use-package/use-package-tests.el | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index 3db6f19e901..64f5ab534d3 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el | |||
| @@ -928,7 +928,25 @@ | |||
| 928 | (load "foo" nil t)))) | 928 | (load "foo" nil t)))) |
| 929 | (require 'foo nil 'nil) | 929 | (require 'foo nil 'nil) |
| 930 | (config) | 930 | (config) |
| 931 | t)))) | 931 | t))) |
| 932 | |||
| 933 | ;; #529 - :demand should not override an explicit use of :after | ||
| 934 | (match-expansion | ||
| 935 | (use-package foo :demand t :after bar) | ||
| 936 | `(progn | ||
| 937 | (eval-after-load 'bar | ||
| 938 | '(require 'foo nil t)))) | ||
| 939 | |||
| 940 | (let ((byte-compile-current-file t)) | ||
| 941 | (match-expansion | ||
| 942 | (use-package foo :demand t :after bar) | ||
| 943 | `(progn | ||
| 944 | (eval-and-compile | ||
| 945 | (eval-when-compile | ||
| 946 | (with-demoted-errors "Cannot load foo: %S" nil | ||
| 947 | (load "foo" nil t)))) | ||
| 948 | (eval-after-load 'bar | ||
| 949 | '(require 'foo nil t)))))) | ||
| 932 | 950 | ||
| 933 | (ert-deftest use-package-test/:config () | 951 | (ert-deftest use-package-test/:config () |
| 934 | (match-expansion | 952 | (match-expansion |