From 7ed29c4dc940a871562aaa802ac53ddee4c66a27 Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Sat, 8 Nov 2014 14:12:42 -0500 Subject: Re-work filtering and caching * sx-auth.el - Use new symbolic cache access * sx-cache.el - Implement symbolic cache access * sx-filter.el - Use symbolic cache access - Compile and save filters on-demand (more work to be done to this end) * sx-question.el - Symbolic filters * sx-request.el - Protection against infinitely recursing when compiling a filter This will be re-worked into requests (a front-end function) and 'raw' requests (a back-end function). The front-end will add convenience to the back-end. * test/tests.el Remove outdated tests --- test/tests.el | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'test') diff --git a/test/tests.el b/test/tests.el index c7861d8..7915ac0 100644 --- a/test/tests.el +++ b/test/tests.el @@ -9,8 +9,7 @@ (defvar sx-test-data-dir (expand-file-name "data-samples/" - (or (file-name-directory load-file-name) "./")) - "") + (or (file-name-directory load-file-name) "./"))) (defun sx-test-sample-data (method &optional directory) (let ((file (concat (when directory (concat directory "/")) @@ -89,24 +88,6 @@ ((1 . alpha) (2 . beta))] '(1 2 3))))) -(ert-deftest test-filters () - (let ((stack-cache-directory (make-temp-file "stack-test" t))) - (should-error (sx-filter-store "names must be symbols" - "this is a filter")) - ;; basic use - (should (equal '((test . "filter")) - (sx-filter-store 'test "filter"))) - ;; aggregation - (should (equal '((test2 . "filter2") (test . "filter")) - (sx-filter-store 'test2 "filter2"))) - ;; mutation - (should (equal '((test2 . "filter2") (test . "filter-test")) - (sx-filter-store 'test "filter-test"))) - ;; clean up (note: the file should exist) - (delete-file - (sx-cache-get-file-name - sx-filter-cache-file)))) - (defmacro line-should-match (regexp) "" `(let ((line (buffer-substring-no-properties -- cgit v1.2.3