diff options
| author | Lars Ingebrigtsen | 2022-05-01 23:05:06 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-05-01 23:05:06 +0200 |
| commit | 51186ed69c361abd73d20a96e929b127cd7f15f9 (patch) | |
| tree | 9eec28cb285349c0324fe54ce219ebd614ef4026 /test | |
| parent | 4f395efa06d88832c376c2b1d4607677436228c0 (diff) | |
| download | emacs-51186ed69c361abd73d20a96e929b127cd7f15f9.tar.gz emacs-51186ed69c361abd73d20a96e929b127cd7f15f9.zip | |
Fix string-lines return for ""
* lisp/subr.el (string-lines): Return the correct result on ""
(bug#55213).
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/subr-tests.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 93e4475d6bc..f4676793ff2 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el | |||
| @@ -1029,6 +1029,8 @@ final or penultimate step during initialization.")) | |||
| 1029 | (should-not (readablep (list (make-marker))))) | 1029 | (should-not (readablep (list (make-marker))))) |
| 1030 | 1030 | ||
| 1031 | (ert-deftest test-string-lines () | 1031 | (ert-deftest test-string-lines () |
| 1032 | (should (equal (string-lines "") '(""))) | ||
| 1033 | |||
| 1032 | (should (equal (string-lines "foo") '("foo"))) | 1034 | (should (equal (string-lines "foo") '("foo"))) |
| 1033 | (should (equal (string-lines "foo\n") '("foo"))) | 1035 | (should (equal (string-lines "foo\n") '("foo"))) |
| 1034 | (should (equal (string-lines "foo\nbar") '("foo" "bar"))) | 1036 | (should (equal (string-lines "foo\nbar") '("foo" "bar"))) |