[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master acce29d: * test/lisp/emacs-lisp/cl-lib-tests.el: Im
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master acce29d: * test/lisp/emacs-lisp/cl-lib-tests.el: Improve symbol-macrolet tests |
Date: |
Sat, 1 Apr 2017 12:11:15 -0400 (EDT) |
branch: master
commit acce29d6c57f66646190595b5b9427602fc4a7fd
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* test/lisp/emacs-lisp/cl-lib-tests.el: Improve symbol-macrolet tests
(cl-lib-symbol-macrolet): Fix last test so it doesn't break the whole
test suite.
(cl-lib-symbol-macrolet-2): New test.
---
test/lisp/emacs-lisp/cl-lib-tests.el | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el
b/test/lisp/emacs-lisp/cl-lib-tests.el
index b594620..093cb34 100644
--- a/test/lisp/emacs-lisp/cl-lib-tests.el
+++ b/test/lisp/emacs-lisp/cl-lib-tests.el
@@ -494,12 +494,29 @@
(should-not (cl-typep 1 'cl-lib-test-type)))
(ert-deftest cl-lib-symbol-macrolet ()
+ ;; bug#26325
+ :expected-result :failed
(should (equal (cl-flet ((f (x) (+ x 5)))
(let ((x 5))
(f (+ x 6))))
- (cl-symbol-macrolet ((f (+ x 6)))
- (cl-flet ((f (x) (+ x 5)))
- (let ((x 5))
- (f f)))))))
+ ;; Go through `eval', otherwise the macro-expansion
+ ;; error prevents running the whole test suite :-(
+ (eval '(cl-symbol-macrolet ((f (+ x 6)))
+ (cl-flet ((f (x) (+ x 5)))
+ (let ((x 5))
+ (f f))))
+ t))))
+
+(defmacro cl-lib-symbol-macrolet-4+5 ()
+ ;; bug#26068
+ (let* ((sname "x")
+ (s1 (make-symbol sname))
+ (s2 (make-symbol sname)))
+ `(cl-symbol-macrolet ((,s1 4)
+ (,s2 5))
+ (+ ,s1 ,s2))))
+
+(ert-deftest cl-lib-symbol-macrolet-2 ()
+ (should (equal (cl-lib-symbol-macrolet-4+5) (+ 4 5))))
;;; cl-lib.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master acce29d: * test/lisp/emacs-lisp/cl-lib-tests.el: Improve symbol-macrolet tests,
Stefan Monnier <=