aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/tests.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/test/tests.el b/test/tests.el
index 66d8d88..3c275fd 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -120,17 +120,21 @@
(ert-deftest macro-test--sx-assoc-let ()
"Tests macro expansion for `sx-assoc-let'"
- (should
- (equal '(progn (require 'let-alist)
- (sx--ensure-site data)
- (let-alist data .test))
- (macroexpand '(sx-assoc-let data .test))))
- (should
- (equal '(progn (require 'let-alist)
- (sx--ensure-site data)
- (let-alist data (cons .test-one .test-two)))
- (macroexpand
- '(sx-assoc-let data (cons .test-one .test-two))))))
+ (let ((prototype '((test . nil) (test-one . 1) (test-two . 2)
+ (link . "http://meta.emacs.stackexchange.com/"))))
+ (let ((data (copy-tree prototype)))
+ (should
+ (null (let-alist data .site))))
+
+ (let ((data (copy-tree prototype)))
+ (should
+ (equal (sx-assoc-let data .site)
+ "meta.emacs")))
+
+ (let ((data (copy-tree prototype)))
+ (should
+ (equal (sx-assoc-let data (cons .test-one .test-two))
+ '(1 . 2))))))
(ert-deftest sx--user-@name ()
"Tests macro expansion for `sx-assoc-let'"