aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test-macros.el11
-rw-r--r--test/test-printing.el7
-rw-r--r--test/test-util.el4
3 files changed, 13 insertions, 9 deletions
diff --git a/test/test-macros.el b/test/test-macros.el
index 8bdd527..2169088 100644
--- a/test/test-macros.el
+++ b/test/test-macros.el
@@ -1,11 +1,12 @@
(defmacro sx-test-with-json-data (cell &rest body)
- (declare (indent 1))
- `(let ((,cell '((test . nil) (test-one . 1) (test-two . 2)
- (link . "http://meta.emacs.stackexchange.com/"))))
- ,@body))
+ "Run BODY with sample data let-bound to CELL"
+ (declare (indent 1))
+ `(let ((,cell '((test . nil) (test-one . 1) (test-two . 2)
+ (link . "http://meta.emacs.stackexchange.com/"))))
+ ,@body))
(ert-deftest macro-test--sx-assoc-let ()
- "Tests macro expansion for `sx-assoc-let'"
+ "Test `sx-assoc-let'"
(sx-test-with-json-data data
(should
(null (let-alist data .site))))
diff --git a/test/test-printing.el b/test/test-printing.el
index 0ea5b03..2260a00 100644
--- a/test/test-printing.el
+++ b/test/test-printing.el
@@ -3,7 +3,7 @@
(require 'cl-lib)
(defmacro line-should-match (regexp)
- ""
+ "Test if the line at point matches REGEXP"
`(let ((line (buffer-substring-no-properties
(line-beginning-position)
(line-end-position))))
@@ -11,6 +11,9 @@
(should (string-match ,regexp line))))
(defmacro question-list-regex (title votes answers &rest tags)
+ "Construct a matching regexp for TITLE, VOTES, and ANSWERS.
+Each element of TAGS is appended at the end of the expression
+after being run through `sx-question--tag-format'."
`(rx line-start
(+ whitespace) ,(number-to-string votes)
(+ whitespace) ,(number-to-string answers)
@@ -51,7 +54,7 @@
2 1 "autocomplete" "performance" "ctags"))))
(ert-deftest sx--user-@name ()
- "Tests macro expansion for `sx-assoc-let'"
+ "Test macro expansion for `sx-assoc-let'"
(should
(string=
(sx--user-@name '((display_name . "ĥÞßđłřğĝýÿñńśşšŝżźžçćčĉùúûüŭůòóôõöøőðìíîïıèéêëęàåáâäãåąĵ★")))
diff --git a/test/test-util.el b/test/test-util.el
index 53dc200..49df274 100644
--- a/test/test-util.el
+++ b/test/test-util.el
@@ -1,5 +1,5 @@
(ert-deftest test-tree-filter ()
- "`sx-core-filter-data'"
+ "Test `sx-core-filter-data'"
;; flat
(should
(equal
@@ -34,7 +34,7 @@
'(1 2 3)))))
(ert-deftest thing-as-string ()
- "Tests `sx--thing-as-string'"
+ "Test `sx--thing-as-string'"
(should
(string= (sx--thing-as-string
'(hello world (this is a test))