diff options
| author | Philipp Stephani | 2016-12-10 15:36:11 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2016-12-23 13:21:34 +0100 |
| commit | 6eaadcc7c821b7a8c75ce6d1d56cd7f50898f809 (patch) | |
| tree | 48b8099a287a9a16387e8be86d00aac7406cec6a /test/src | |
| parent | 831bef1a469356b82892c163f33c9c65ccd75c7c (diff) | |
| download | emacs-6eaadcc7c821b7a8c75ce6d1d56cd7f50898f809.tar.gz emacs-6eaadcc7c821b7a8c75ce6d1d56cd7f50898f809.zip | |
Treat incomplete integer literals as errors
See Bug#25120.
* src/lread.c (read_integer): Treat incomplete integer literals as errors.
* test/src/lread-tests.el (lread-empty-int-literal): New unit test for
incomplete integer literals.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/lread-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index 1a82d133a44..609f82ec20b 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el | |||
| @@ -104,4 +104,12 @@ | |||
| 104 | (ert-deftest lread-string-char-name () | 104 | (ert-deftest lread-string-char-name () |
| 105 | (should (equal (read "\"a\\N{SYLOTI NAGRI LETTER DHO}b\"") "a\uA817b"))) | 105 | (should (equal (read "\"a\\N{SYLOTI NAGRI LETTER DHO}b\"") "a\uA817b"))) |
| 106 | 106 | ||
| 107 | (ert-deftest lread-empty-int-literal () | ||
| 108 | "Check that Bug#25120 is fixed." | ||
| 109 | (should-error (read "#b") :type 'invalid-read-syntax) | ||
| 110 | (should-error (read "#o") :type 'invalid-read-syntax) | ||
| 111 | (should-error (read "#x") :type 'invalid-read-syntax) | ||
| 112 | (should-error (read "#24r") :type 'invalid-read-syntax) | ||
| 113 | (should-error (read "#") :type 'invalid-read-syntax)) | ||
| 114 | |||
| 107 | ;;; lread-tests.el ends here | 115 | ;;; lread-tests.el ends here |