Browse Source

test-org/string-width: Add tests for strings with prefix properties

Ihor Radchenko 3 years ago
parent
commit
444d1c50ac
1 changed files with 5 additions and 1 deletions
  1. 5 1
      testing/lisp/test-org-macs.el

+ 5 - 1
testing/lisp/test-org-macs.el

@@ -65,7 +65,11 @@
   (should (= 4 (org-string-width
 		#("123" 1 2 (display #("abc" 1 2 (invisible t)))))))
   ;; Test `space' property in `display'.
-  (should (= 2 (org-string-width #(" " 0 1 (display (space :width 2)))))))
+  (should (= 2 (org-string-width #(" " 0 1 (display (space :width 2))))))
+  ;; Test `wrap-prefix' property.
+  (should (= 2 (org-string-width #("ab" 0 2 (wrap-prefix "  ")))))
+  ;; Test `line-prefix' property.
+  (should (= 2 (org-string-width #("ab" 0 2 (line-prefix "  "))))))
 
 
 ;;; Regexp