From bed5191a0137cb115656baf6ae3535b2a646d0b2 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Fri, 16 Jan 2015 12:56:02 -0200 Subject: Fix and improve tests --- test/test-printing.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/test-printing.el b/test/test-printing.el index 7384829..52fe5be 100644 --- a/test/test-printing.el +++ b/test/test-printing.el @@ -28,11 +28,18 @@ after being run through `sx-question--tag-format'." ;;; Tests (ert-deftest question-list-tag () - "Test `sx-question--tag-format'." + "Test `sx-tag--format'." (should - (string= - (sx-question--tag-format "tag") - "[tag]"))) + (string= (sx-tag--format "tag") "[tag]")) + (with-temp-buffer + (insert (sx-tag--format "tag")) + (should (get-char-property (point-min) 'button)) + (should + (eq (get-char-property (point-min) 'face) 'sx-tag)) + (should + (string= (get-char-property (point-min) 'sx-tag) "tag")) + (should + (string= (get-char-property (point-min) 'sx-button-copy) "tag")))) (ert-deftest question-list-display () (cl-letf (((symbol-function #'sx-request-make) -- cgit v1.2.3