diff options
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/eval-tests.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el index 75999e1a25a..fe08506ed25 100644 --- a/test/src/eval-tests.el +++ b/test/src/eval-tests.el | |||
| @@ -32,4 +32,19 @@ | |||
| 32 | ;; This should not crash. | 32 | ;; This should not crash. |
| 33 | (should-error (funcall '(closure)) :type 'invalid-function)) | 33 | (should-error (funcall '(closure)) :type 'invalid-function)) |
| 34 | 34 | ||
| 35 | (ert-deftest eval-tests--bugs-24912-and-24913 () | ||
| 36 | "Checks that Emacs doesn’t accept weird argument lists. | ||
| 37 | Bug#24912 and Bug#24913." | ||
| 38 | (dolist (args '((&optional) (&rest) (&optional &rest) (&rest &optional) | ||
| 39 | (&optional &rest a) (&optional a &rest) | ||
| 40 | (&rest a &optional) (&rest &optional a) | ||
| 41 | (&optional &optional) (&optional &optional a) | ||
| 42 | (&optional a &optional b) | ||
| 43 | (&rest &rest) (&rest &rest a) | ||
| 44 | (&rest a &rest b))) | ||
| 45 | (should-error (eval `(funcall (lambda ,args)) t) :type 'invalid-function) | ||
| 46 | (should-error (byte-compile-check-lambda-list args)) | ||
| 47 | (let ((byte-compile-debug t)) | ||
| 48 | (should-error (eval `(byte-compile (lambda ,args)) t))))) | ||
| 49 | |||
| 35 | ;;; eval-tests.el ends here | 50 | ;;; eval-tests.el ends here |