diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-11 11:18:32 +0000 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-11 11:29:36 +0000 |
commit | 36ae5019aa6d1cae3cab9e3330591e227b427814 (patch) | |
tree | 273a69a7c16c9e71eca38668d4feb6b8611ba9a8 | |
parent | 4a9736e5104e1eafbf197a441eb6b9178641711e (diff) |
Fix assoc-let test
-rw-r--r-- | sx.el | 3 | ||||
-rw-r--r-- | test/tests.el | 16 |
2 files changed, 11 insertions, 8 deletions
@@ -335,7 +335,8 @@ with a `link' property)." If ALIST doesn't have a `site' property, one is created using the `link' property." (declare (indent 1) (debug t)) - `(let-alist (sx--ensure-site ,alist) ,@body)) + `(progn (sx--ensure-site ,alist) + (let-alist ,alist ,@body))) (defcustom sx-init-hook nil "Hook run when SX initializes. diff --git a/test/tests.el b/test/tests.el index b997c6e..8d1ba44 100644 --- a/test/tests.el +++ b/test/tests.el @@ -121,16 +121,18 @@ (ert-deftest macro-test--sx-assoc-let () "Tests macro expansion for `sx-assoc-let'" (should - (equal '(let ((.test (cdr (assoc 'test data)))) - .test) - (macroexpand + (equal '(progn (sx--ensure-site data) + (let ((.test (cdr (assq 'test data)))) + .test)) + (macroexpand-all '(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 + (equal '(progn (sx--ensure-site data) + (let ((.test-one (cdr (assq 'test-one data))) + (.test-two (cdr (assq 'test-two data)))) + (cons .test-one .test-two))) + (macroexpand-all '(sx-assoc-let data (cons .test-one .test-two)))))) |