Fix shorter-than-length case for string-limit

* lisp/emacs-lisp/subr-x.el (string-limit): Fix
shorter-than-length case.
This commit is contained in:
Lars Ingebrigtsen 2020-12-21 20:42:17 +01:00
parent cf2e832185
commit fd9431dde4
2 changed files with 2 additions and 1 deletions

View file

@ -596,6 +596,7 @@
(should (equal (string-limit "foo" 10) "foo"))
(should (equal (string-limit "foo" 2) "fo"))
(should (equal (string-limit "foo" -2) "oo"))
(should (equal (string-limit "abc" -10) "abc"))
(should (equal (string-limit "foo" 0) "")))
(ert-deftest subr-string-lines ()