diff options
Diffstat (limited to 'test/lisp/emacs-lisp/subr-x-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/subr-x-tests.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el index 949bbb163eb..94ff459869c 100644 --- a/test/lisp/emacs-lisp/subr-x-tests.el +++ b/test/lisp/emacs-lisp/subr-x-tests.el @@ -608,5 +608,11 @@ (should (equal (slice-string "-foo-bar-" "-") '("-foo" "-bar" "-"))) (should (equal (slice-string "ooo" "lala") '("ooo")))) +(ert-deftest subr-string-pad () + (should (equal (string-pad "foo" 5) "foo ")) + (should (equal (string-pad "foo" 5 ?-) "foo--")) + (should (equal (string-pad "foo" -5 ?-) "--foo")) + (should (equal (string-pad "foo" 2 ?-) "foo"))) + (provide 'subr-x-tests) ;;; subr-x-tests.el ends here |