diff options
| author | Mattias EngdegÄrd | 2019-03-12 13:19:35 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2019-03-28 23:57:34 +0100 |
| commit | eb6bbd9fb175cacdfdc54c1187f5785ed3858f2f (patch) | |
| tree | 9d9d04fadb4bef4c9c71cfc63316f39dd767ee84 /test | |
| parent | dd30154e27b1085939abf144daaf257ebda0c3d6 (diff) | |
| download | emacs-eb6bbd9fb175cacdfdc54c1187f5785ed3858f2f.tar.gz emacs-eb6bbd9fb175cacdfdc54c1187f5785ed3858f2f.zip | |
Use memql instead of memq in pcase
* lisp/emacs-lisp/pcase.el (pcase--u1):
Use memql instead of memq to work with bignums (Bug#34781).
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-member): Test the above.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/pcase-tests.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/pcase-tests.el b/test/lisp/emacs-lisp/pcase-tests.el index 1e9d37fbfa9..af8c9a3f3c3 100644 --- a/test/lisp/emacs-lisp/pcase-tests.el +++ b/test/lisp/emacs-lisp/pcase-tests.el | |||
| @@ -51,11 +51,13 @@ | |||
| 51 | 51 | ||
| 52 | (ert-deftest pcase-tests-member () | 52 | (ert-deftest pcase-tests-member () |
| 53 | (should (pcase-tests-grep | 53 | (should (pcase-tests-grep |
| 54 | 'memq (macroexpand-all '(pcase x ((or 1 2 3) body))))) | 54 | 'memql (macroexpand-all '(pcase x ((or 1 2 3) body))))) |
| 55 | (should (pcase-tests-grep | 55 | (should (pcase-tests-grep |
| 56 | 'member (macroexpand-all '(pcase x ((or "a" 2 3) body))))) | 56 | 'member (macroexpand-all '(pcase x ((or "a" 2 3) body))))) |
| 57 | (should-not (pcase-tests-grep | 57 | (should-not (pcase-tests-grep |
| 58 | 'memq (macroexpand-all '(pcase x ((or "a" 2 3) body))))) | 58 | 'memq (macroexpand-all '(pcase x ((or "a" 2 3) body))))) |
| 59 | (should-not (pcase-tests-grep | ||
| 60 | 'memql (macroexpand-all '(pcase x ((or "a" 2 3) body))))) | ||
| 59 | (let ((exp (macroexpand-all | 61 | (let ((exp (macroexpand-all |
| 60 | '(pcase x | 62 | '(pcase x |
| 61 | ("a" body1) | 63 | ("a" body1) |