From 59327f6f9c6ba419543c47670a62af0aa41271ca Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Sun, 4 Jan 2015 11:41:30 -0500 Subject: Tree-style specification for filter-from-nil Instead of saying (field-a field-b object-a.subfield field-c object-b.subfield-a object-b.subfield-b) you can rather say (field-a field-b (object-a subfield) field-c (object-b subfield-a subfield-b)) To avoid a dependency loop, sx-browse-filter has been moved to sx-filter.el. --- test/test-macros.el | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test/test-macros.el') diff --git a/test/test-macros.el b/test/test-macros.el index b6bf20b..1634603 100644 --- a/test/test-macros.el +++ b/test/test-macros.el @@ -20,3 +20,25 @@ (should (equal (sx-assoc-let data (cons .test-one .test-two)) '(1 . 2))))) + +(ert-deftest macro-test--sx-filter-from-nil () + "Test `sx-filter-from-nil'" + (should + (equal + (sx-filter-from-nil + (one two (three four five) (six seven) + (a b c d e))) + '((one two three.four three.five six.seven + a.b a.c a.d a.e + .backoff + .error_id + .error_message + .error_name + .has_more + .items + .page + .page_size + .quota_max + .quota_remaining + .total) + nil none)))) -- cgit v1.2.3