From ea1a5e0e1ade29688d7db420d564e494dea7974c Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Wed, 12 Nov 2014 18:16:28 -0500 Subject: Add tests for `sx-assoc-let' --- test/tests.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') 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-+"Making tag completion table" 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)))))) -- cgit v1.2.3