diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el | 7 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/edebug-tests.el | 11 |
2 files changed, 18 insertions, 0 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 e86c2f1c1e7..f3fc78d4e12 100644 --- a/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el +++ b/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el | |||
| @@ -130,5 +130,12 @@ | |||
| 130 | (let ((two 2) (three 3)) | 130 | (let ((two 2) (three 3)) |
| 131 | (cl-destructuring-bind (x . y) (cons two three) (+ x!x! y!y!)))) | 131 | (cl-destructuring-bind (x . y) (cons two three) (+ x!x! y!y!)))) |
| 132 | 132 | ||
| 133 | (defun edebug-test-code-use-cl-macrolet (x) | ||
| 134 | (cl-macrolet ((wrap (func &rest args) | ||
| 135 | `(format "The result of applying %s to %s is %S" | ||
| 136 | ',func!func! ',args | ||
| 137 | ,(cons func args)))) | ||
| 138 | (wrap + 1 x))) | ||
| 139 | |||
| 133 | (provide 'edebug-test-code) | 140 | (provide 'edebug-test-code) |
| 134 | ;;; edebug-test-code.el ends here | 141 | ;;; 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 85f6bd47db2..7d780edf285 100644 --- a/test/lisp/emacs-lisp/edebug-tests.el +++ b/test/lisp/emacs-lisp/edebug-tests.el | |||
| @@ -913,5 +913,16 @@ test and possibly others should be updated." | |||
| 913 | "g" | 913 | "g" |
| 914 | (should (equal edebug-tests-@-result 5))))) | 914 | (should (equal edebug-tests-@-result 5))))) |
| 915 | 915 | ||
| 916 | (ert-deftest edebug-tests-cl-macrolet () | ||
| 917 | "Edebug can instrument `cl-macrolet' expressions. (Bug#29919)" | ||
| 918 | (edebug-tests-with-normal-env | ||
| 919 | (edebug-tests-setup-@ "use-cl-macrolet" '(10) t) | ||
| 920 | (edebug-tests-run-kbd-macro | ||
| 921 | "@ SPC SPC" | ||
| 922 | (edebug-tests-should-be-at "use-cl-macrolet" "func") | ||
| 923 | (edebug-tests-should-match-result-in-messages "+") | ||
| 924 | "g" | ||
| 925 | (should (equal edebug-tests-@-result "The result of applying + to (1 x) is 11"))))) | ||
| 926 | |||
| 916 | (provide 'edebug-tests) | 927 | (provide 'edebug-tests) |
| 917 | ;;; edebug-tests.el ends here | 928 | ;;; edebug-tests.el ends here |