summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/subr-x-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/emacs-lisp/subr-x-tests.el')
-rw-r--r--test/lisp/emacs-lisp/subr-x-tests.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el
index 99c0e822155..7a3efe9db62 100644
--- a/test/lisp/emacs-lisp/subr-x-tests.el
+++ b/test/lisp/emacs-lisp/subr-x-tests.el
@@ -766,5 +766,10 @@
(should (equal (sort (hash-table-keys h) #'string<) '(a b c)))
(should (equal (sort (hash-table-values h) #'<) '(1 2 3)))))
+(ert-deftest test-string-truncate-left ()
+ (should (equal (string-truncate-left "band" 3) "...d"))
+ (should (equal (string-truncate-left "band" 2) "...d"))
+ (should (equal (string-truncate-left "longstring" 8) "...tring")))
+
(provide 'subr-x-tests)
;;; subr-x-tests.el ends here