From 4cbd72931e7982878334c92abb08272f11ae0f32 Mon Sep 17 00:00:00 2001 From: Yasushi SHOJI Date: Tue, 31 May 2016 16:25:42 +0900 Subject: [PATCH 2/2] org: Add test for tag width calculation This is a simple unit test case for the previous fix. --- testing/lisp/test-org.el | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index db7e525..4873fc2 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -4132,6 +4132,28 @@ Paragraph" (org-occur "A" nil (lambda () (equal (org-get-heading) "H2"))))))) +;;; Tags + +(ert-deftest test-org/tag-align () + "Test `org-align-tags-here' with different display width." + (should + ;; 12345678901234567890 + (equal "* Test :abc:" + (org-test-with-temp-text "* Test :abc:" + (let ((org-tags-column -20) + (indent-tabs-mode nil)) + (org-fix-tags-on-the-fly)) + (buffer-string)))) + (should + ;; 12345678901234567890 + (equal "* Test :日本語:" + (org-test-with-temp-text "* Test :日本語:" + (let ((org-tags-column -20) + (indent-tabs-mode nil)) + (org-fix-tags-on-the-fly)) + (buffer-string))))) + + ;;; Timestamps API (ert-deftest test-org/time-stamp () -- 2.8.1