diff options
author | Glenn Morris <rgm@gnu.org> | 2017-11-29 17:12:05 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2017-11-29 17:12:05 -0800 |
commit | 7aedb6116ffaa6590c86e70380f533385c1ced58 (patch) | |
tree | 186436d57261f5bd0e5f1bff8844615c17b46128 /test/lisp/emacs-lisp | |
parent | 728d259243206136387b6b59c2efb7de8cd9f6ed (diff) | |
parent | 02d114d6b85e02132d5f99ead517b69dbdd77e35 (diff) | |
download | emacs-7aedb6116ffaa6590c86e70380f533385c1ced58.tar.gz emacs-7aedb6116ffaa6590c86e70380f533385c1ced58.tar.bz2 emacs-7aedb6116ffaa6590c86e70380f533385c1ced58.zip |
Merge from origin/emacs-26
02d114d6b8 * lisp/tree-widget.el (tree-widget-end-guide): Escape it. ...
0a85d12474 Fix ELisp "Warning Tips"
06d05fec84 Fix Bug#29163
ac64fdb248 Harden exec_byte_code against redefining 'error'
700f74e4c8 Fix Edebug specs for if-let* and and-let* (Bug#29236)
0ded1b41a9 Fix Edebug's handling of dotted specs (bug#6415)
16358d4fcb Improve documentation of "constant" symbols
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el | 4 | ||||
-rw-r--r-- | test/lisp/emacs-lisp/edebug-tests.el | 14 | ||||
-rw-r--r-- | test/lisp/emacs-lisp/subr-x-tests.el | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el b/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el index f52a2b1896c..ca49dcd213d 100644 --- a/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el +++ b/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el @@ -126,5 +126,9 @@ !start!(with-current-buffer (get-buffer-create "*edebug-test-code-buffer*") !body!(format "current-buffer: %s" (current-buffer)))) +(defun edebug-test-code-use-destructuring-bind () + (let ((two 2) (three 3)) + (cl-destructuring-bind (x . y) (cons two three) (+ x!x! y!y!)))) + (provide 'edebug-test-code) ;;; edebug-test-code.el ends here diff --git a/test/lisp/emacs-lisp/edebug-tests.el b/test/lisp/emacs-lisp/edebug-tests.el index 02f4d1c5abe..f6c016cdf80 100644 --- a/test/lisp/emacs-lisp/edebug-tests.el +++ b/test/lisp/emacs-lisp/edebug-tests.el @@ -899,5 +899,19 @@ test and possibly others should be updated." "@g" (should (equal edebug-tests-@-result '(#("abcd" 1 3 (face italic)) 511)))))) +(ert-deftest edebug-tests-dotted-forms () + "Edebug can instrument code matching the tail of a dotted spec (Bug#6415)." + (edebug-tests-with-normal-env + (edebug-tests-setup-@ "use-destructuring-bind" nil t) + (edebug-tests-run-kbd-macro + "@ SPC SPC SPC SPC SPC SPC" + (edebug-tests-should-be-at "use-destructuring-bind" "x") + (edebug-tests-should-match-result-in-messages "2 (#o2, #x2, ?\\C-b)") + "SPC" + (edebug-tests-should-be-at "use-destructuring-bind" "y") + (edebug-tests-should-match-result-in-messages "3 (#o3, #x3, ?\\C-c)") + "g" + (should (equal edebug-tests-@-result 5))))) + (provide 'edebug-tests) ;;; edebug-tests.el ends here diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el index 0e8871d9a9c..0187f39d15d 100644 --- a/test/lisp/emacs-lisp/subr-x-tests.el +++ b/test/lisp/emacs-lisp/subr-x-tests.el @@ -403,7 +403,7 @@ (should-error (eval '(and-let* (nil (x 1))) lexical-binding) :type 'setting-constant) (should (equal nil (and-let* ((nil) (x 1))))) - (should-error (eval (and-let* (2 (x 1))) lexical-binding) + (should-error (eval '(and-let* (2 (x 1))) lexical-binding) :type 'wrong-type-argument) (should (equal 1 (and-let* ((2) (x 1))))) (should (equal 2 (and-let* ((x 1) (2))))) |