aboutsummaryrefslogtreecommitdiff
path: root/test/test-macros.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-01 12:05:04 -0500
committerSean Allred <code@seanallred.com>2015-01-01 12:05:04 -0500
commit7217c37a3619c72bce6ac5be97b969a0bb2f03cc (patch)
tree2122e7af13722a8bdf71e396774309c4e84ad78c /test/test-macros.el
parent9650a1541b43da18067466df7671d23d5baffeed (diff)
Split tests into separate files
Diffstat (limited to 'test/test-macros.el')
-rw-r--r--test/test-macros.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test-macros.el b/test/test-macros.el
new file mode 100644
index 0000000..6a1910c
--- /dev/null
+++ b/test/test-macros.el
@@ -0,0 +1,18 @@
+(ert-deftest macro-test--sx-assoc-let ()
+ "Tests macro expansion for `sx-assoc-let'"
+ (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))))))
+