diff options
| author | Stefan Monnier | 2014-09-22 14:05:22 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-09-22 14:05:22 -0400 |
| commit | 2b968ea662e3dfdf3cd125a8d236220b938cb6ab (patch) | |
| tree | cacd9bb823b66bd8d8fe2877237b6033e11e6e30 /test | |
| parent | 7fbd780a0013b09c294625e4985f7000af55a5c6 (diff) | |
| download | emacs-2b968ea662e3dfdf3cd125a8d236220b938cb6ab.tar.gz emacs-2b968ea662e3dfdf3cd125a8d236220b938cb6ab.zip | |
* lisp/emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
(pcase--funcall, pcase--eval): New functions.
(pcase--u1): Use them for guard, pred, let, and app.
(\`): Use the new feature to generate better code for vector patterns.
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/pcase-tests.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/automated/pcase-tests.el b/test/automated/pcase-tests.el index 7e3c40235e6..ec0c3bc7fd5 100644 --- a/test/automated/pcase-tests.el +++ b/test/automated/pcase-tests.el | |||
| @@ -58,6 +58,8 @@ | |||
| 58 | (should-not (pcase-tests-grep 'memq exp)) | 58 | (should-not (pcase-tests-grep 'memq exp)) |
| 59 | (should-not (pcase-tests-grep 'member exp)))) | 59 | (should-not (pcase-tests-grep 'member exp)))) |
| 60 | 60 | ||
| 61 | (ert-deftest pcase-tests-vectors () | ||
| 62 | (should (equal (pcase [1 2] (`[,x] 1) (`[,x ,y] (+ x y))) 3))) | ||
| 61 | 63 | ||
| 62 | ;; Local Variables: | 64 | ;; Local Variables: |
| 63 | ;; no-byte-compile: t | 65 | ;; no-byte-compile: t |