diff options
| author | Mattias EngdegÄrd | 2022-06-03 10:12:24 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2022-06-03 11:23:30 +0200 |
| commit | 28622d4dd0347227a28b7b25c674437239a00a06 (patch) | |
| tree | 194fe6c6de674eec25f4126fd5d772000fd1b99a /test/src/lread-tests.el | |
| parent | e48c9181b1c103b42032a5fb6547184da75bd773 (diff) | |
| download | emacs-28622d4dd0347227a28b7b25c674437239a00a06.tar.gz emacs-28622d4dd0347227a28b7b25c674437239a00a06.zip | |
Let ?\LF signal an error (bug#55738)
As suggested by Stefan Monnier.
* src/lread.c (read_escape):
Signal an error for ?\LF since it cannot reasonably be intended.
* test/src/lread-tests.el (lread-escaped-lf): Update test.
* etc/NEWS: Announce.
Diffstat (limited to 'test/src/lread-tests.el')
| -rw-r--r-- | test/src/lread-tests.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index 99eec9d5487..f190f14781e 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el | |||
| @@ -318,8 +318,8 @@ literals (Bug#20852)." | |||
| 318 | '(## . 2)))) | 318 | '(## . 2)))) |
| 319 | 319 | ||
| 320 | (ert-deftest lread-escaped-lf () | 320 | (ert-deftest lread-escaped-lf () |
| 321 | ;; ?\LF should produce LF (only inside string literals do we ignore \LF). | 321 | ;; ?\LF should signal an error; \LF is ignored inside string literals. |
| 322 | (should (equal (read-from-string "?\\\n") '(?\n . 3))) | 322 | (should-error (read-from-string "?\\\n x")) |
| 323 | (should (equal (read-from-string "\"a\\\nb\"") '("ab" . 6)))) | 323 | (should (equal (read-from-string "\"a\\\nb\"") '("ab" . 6)))) |
| 324 | 324 | ||
| 325 | ;;; lread-tests.el ends here | 325 | ;;; lread-tests.el ends here |