diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-12-22 06:54:32 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-12-22 06:54:32 +0100 |
commit | 9480169f1b8a27ed61db0913989c9a81339ccd9d (patch) | |
tree | b04ae101abf03d0baec0da2b2e5156603801efd9 /test | |
parent | d2b86118629562600c07dbc5befa78ac8b860b68 (diff) | |
download | emacs-9480169f1b8a27ed61db0913989c9a81339ccd9d.tar.gz |
Change the string-limit parameter semantics
* lisp/emacs-lisp/subr-x.el (string-limit): Alter the calling
convention.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/emacs-lisp/subr-x-tests.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el index 2e16cd0f30b..52b48095149 100644 --- a/test/lisp/emacs-lisp/subr-x-tests.el +++ b/test/lisp/emacs-lisp/subr-x-tests.el @@ -595,9 +595,10 @@ (ert-deftest subr-string-limit () (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) ""))) + (should (equal (string-limit "foo" 2 t) "oo")) + (should (equal (string-limit "abc" 10 t) "abc")) + (should (equal (string-limit "foo" 0) "")) + (should-error (string-limit "foo" -1))) (ert-deftest subr-string-lines () (should (equal (string-lines "foo") '("foo"))) |