aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test-printing.el9
-rw-r--r--test/tests.el6
2 files changed, 14 insertions, 1 deletions
diff --git a/test/test-printing.el b/test/test-printing.el
index 2260a00..6225bf6 100644
--- a/test/test-printing.el
+++ b/test/test-printing.el
@@ -7,7 +7,7 @@
`(let ((line (buffer-substring-no-properties
(line-beginning-position)
(line-end-position))))
- (message "Line here is: %S" line)
+ (sx-test-message "Line here is: %S" line)
(should (string-match ,regexp line))))
(defmacro question-list-regex (title votes answers &rest tags)
@@ -27,6 +27,13 @@ after being run through `sx-question--tag-format'."
;;; Tests
+(ert-deftest question-list-tag ()
+ "Test `sx-question--tag-format'."
+ (should
+ (string=
+ (sx-question--tag-format "tag")
+ "[tag]")))
+
(ert-deftest question-list-display ()
(cl-letf (((symbol-function #'sx-request-make)
(lambda (&rest _) sx-test-data-questions)))
diff --git a/test/tests.el b/test/tests.el
index daaa8b5..d709600 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -51,5 +51,11 @@
sx-test-base-dir
(symbol-name test))))
+(setq sx-test-enable-messages nil)
+
+(defun sx-test-message (message &rest args)
+ (when sx-test-enable-messages
+ (apply #'message (cons message args))))
+
(mapc #'sx-load-test
'(api macros printing util))