aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNoam Postavsky2018-01-28 10:23:18 -0500
committerNoam Postavsky2018-01-28 10:49:51 -0500
commit0510a78da5faaa40ebfdf59d0ac6107a72c1be1d (patch)
tree1fd0abd958f1f31e200b5f2aac8fe97ceb88a2a2 /test
parent6415b2d40c13be2c5cd5f797718c391d1c4ce9e6 (diff)
downloademacs-0510a78da5faaa40ebfdf59d0ac6107a72c1be1d.tar.gz
emacs-0510a78da5faaa40ebfdf59d0ac6107a72c1be1d.zip
Revert "Signal error for symbol names with strange quotes (Bug#2967)"
That commit did not make the corresponding change to printing, thus breaking the (eq (read (prin1-to-string SYM)) SYM) invariant for those symbols. It's too late in the release cycle to change printing behavior, therefore revert the reader change. Don't merge to master, the print function will be updated there (see "Fix round tripping of read->print for symbols with strange quotes").
Diffstat (limited to 'test')
-rw-r--r--test/src/lread-tests.el17
1 files changed, 0 insertions, 17 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el
index 4fec9286e45..5c3fea7e680 100644
--- a/test/src/lread-tests.el
+++ b/test/src/lread-tests.el
@@ -142,23 +142,6 @@ 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
162(ert-deftest lread-test-bug26837 () 145(ert-deftest lread-test-bug26837 ()
163 "Test for https://debbugs.gnu.org/26837 ." 146 "Test for https://debbugs.gnu.org/26837 ."
164 (let ((load-path (cons 147 (let ((load-path (cons