aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-11-12 18:16:28 -0500
committerSean Allred <code@seanallred.com>2014-11-12 18:16:28 -0500
commitea1a5e0e1ade29688d7db420d564e494dea7974c (patch)
treee05587fe742ded2795267caa755130e80fae118e /test
parent2c172707073d6a8e558d81999d0ef14b60acb0af (diff)
Add tests for `sx-assoc-let'
Diffstat (limited to 'test')
-rw-r--r--test/tests.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/tests.el b/test/tests.el
index b48761d..6a48257 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -116,3 +116,19 @@
(sx-question-list-previous 4)
(line-should-match
"^\\s-+2\\s-+1\\s-+&quot;Making tag completion table&quot; Freezes/Blocks -- how to disable [ 0-9]+[ydhms] ago\\s-+\\[autocomplete\\]")))
+
+(ert-deftest macro-test--sx-assoc-let ()
+ "Tests macro expansion for `sx-assoc-let'"
+ (should
+ (equal '(let ((.test (cdr (assoc 'test data))))
+ .test)
+ (macroexpand
+ '(sx-assoc-let data
+ .test))))
+ (should
+ (equal '(let ((.test-one (cdr (assoc 'test-one data)))
+ (.test-two (cdr (assoc 'test-two data))))
+ (cons .test-one .test-two))
+ (macroexpand
+ '(sx-assoc-let data
+ (cons .test-one .test-two))))))