diff options
| author | Michael R. Mauger | 2017-07-24 22:15:04 -0400 |
|---|---|---|
| committer | Michael R. Mauger | 2017-07-24 22:15:04 -0400 |
| commit | df1a71272e5cdd10b511e2ffd702ca50ddd8a773 (patch) | |
| tree | 9b9ac725394ee80891e2bff57b6407d0e491e71a /test/src/lread-tests.el | |
| parent | eb27fc4d49e8c914cd0e6a8a2d02159601542141 (diff) | |
| parent | 32daa3cb54523006c88717cbeac87964cd687a1b (diff) | |
| download | emacs-df1a71272e5cdd10b511e2ffd702ca50ddd8a773.tar.gz emacs-df1a71272e5cdd10b511e2ffd702ca50ddd8a773.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'test/src/lread-tests.el')
| -rw-r--r-- | test/src/lread-tests.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index 98cbb6a301d..dd5a2003b41 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el | |||
| @@ -142,6 +142,23 @@ literals (Bug#20852)." | |||
| 142 | "unescaped character literals " | 142 | "unescaped character literals " |
| 143 | "`?\"', `?(', `?)', `?;', `?[', `?]' detected!"))))) | 143 | "`?\"', `?(', `?)', `?;', `?[', `?]' detected!"))))) |
| 144 | 144 | ||
| 145 | (ert-deftest lread-tests--funny-quote-symbols () | ||
| 146 | "Check that 'smart quotes' or similar trigger errors in symbol names." | ||
| 147 | (dolist (quote-char | ||
| 148 | '(#x2018 ;; LEFT SINGLE QUOTATION MARK | ||
| 149 | #x2019 ;; RIGHT SINGLE QUOTATION MARK | ||
| 150 | #x201B ;; SINGLE HIGH-REVERSED-9 QUOTATION MARK | ||
| 151 | #x201C ;; LEFT DOUBLE QUOTATION MARK | ||
| 152 | #x201D ;; RIGHT DOUBLE QUOTATION MARK | ||
| 153 | #x201F ;; DOUBLE HIGH-REVERSED-9 QUOTATION MARK | ||
| 154 | #x301E ;; DOUBLE PRIME QUOTATION MARK | ||
| 155 | #xFF02 ;; FULLWIDTH QUOTATION MARK | ||
| 156 | #xFF07 ;; FULLWIDTH APOSTROPHE | ||
| 157 | )) | ||
| 158 | (let ((str (format "%cfoo" quote-char))) | ||
| 159 | (should-error (read str) :type 'invalid-read-syntax) | ||
| 160 | (should (eq (read (concat "\\" str)) (intern str)))))) | ||
| 161 | |||
| 145 | (ert-deftest lread-test-bug26837 () | 162 | (ert-deftest lread-test-bug26837 () |
| 146 | "Test for http://debbugs.gnu.org/26837 ." | 163 | "Test for http://debbugs.gnu.org/26837 ." |
| 147 | (let ((load-path (cons | 164 | (let ((load-path (cons |
| @@ -164,4 +181,10 @@ literals (Bug#20852)." | |||
| 164 | (concat (format-message "Loading `%s': " file-name) | 181 | (concat (format-message "Loading `%s': " file-name) |
| 165 | "old-style backquotes detected!"))))) | 182 | "old-style backquotes detected!"))))) |
| 166 | 183 | ||
| 184 | (ert-deftest lread-lread--substitute-object-in-subtree () | ||
| 185 | (let ((x (cons 0 1))) | ||
| 186 | (setcar x x) | ||
| 187 | (lread--substitute-object-in-subtree x 1 t) | ||
| 188 | (should (eq x (cdr x))))) | ||
| 189 | |||
| 167 | ;;; lread-tests.el ends here | 190 | ;;; lread-tests.el ends here |