aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/emacs-lisp/bytecomp-tests.el11
-rw-r--r--test/src/lread-tests.el10
2 files changed, 8 insertions, 13 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index 30d2a4753cf..1f85c269780 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -534,23 +534,18 @@ literals (Bug#20852)."
534 534
535(ert-deftest bytecomp-tests--old-style-backquotes () 535(ert-deftest bytecomp-tests--old-style-backquotes ()
536 "Check that byte compiling warns about old-style backquotes." 536 "Check that byte compiling warns about old-style backquotes."
537 (should (boundp 'lread--old-style-backquotes))
538 (bytecomp-tests--with-temp-file source 537 (bytecomp-tests--with-temp-file source
539 (write-region "(` (a b))" nil source) 538 (write-region "(` (a b))" nil source)
540 (bytecomp-tests--with-temp-file destination 539 (bytecomp-tests--with-temp-file destination
541 (let* ((byte-compile-dest-file-function (lambda (_) destination)) 540 (let* ((byte-compile-dest-file-function (lambda (_) destination))
542 (byte-compile-error-on-warn t) 541 (byte-compile-debug t)
543 (byte-compile-debug t) 542 (err (should-error (byte-compile-file source))))
544 (err (should-error (byte-compile-file source))))
545 (should (equal (cdr err) 543 (should (equal (cdr err)
546 (list "!! The file uses old-style backquotes !! 544 '("Loading `nil': old-style backquotes detected!")))))))
547This functionality has been obsolete for more than 10 years already
548and will be removed soon. See (elisp)Backquote in the manual.")))))))
549 545
550 546
551(ert-deftest bytecomp-tests-function-put () 547(ert-deftest bytecomp-tests-function-put ()
552 "Check `function-put' operates during compilation." 548 "Check `function-put' operates during compilation."
553 (should (boundp 'lread--old-style-backquotes))
554 (bytecomp-tests--with-temp-file source 549 (bytecomp-tests--with-temp-file source
555 (dolist (form '((function-put 'bytecomp-tests--foo 'foo 1) 550 (dolist (form '((function-put 'bytecomp-tests--foo 'foo 1)
556 (function-put 'bytecomp-tests--foo 'bar 2) 551 (function-put 'bytecomp-tests--foo 'bar 2)
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el
index ac730b4f005..3f41982eba1 100644
--- a/test/src/lread-tests.el
+++ b/test/src/lread-tests.el
@@ -173,13 +173,13 @@ literals (Bug#20852)."
173 (should (string-suffix-p "/somelib.el" (caar load-history))))) 173 (should (string-suffix-p "/somelib.el" (caar load-history)))))
174 174
175(ert-deftest lread-tests--old-style-backquotes () 175(ert-deftest lread-tests--old-style-backquotes ()
176 "Check that loading warns about old-style backquotes." 176 "Check that loading doesn't accept old-style backquotes."
177 (lread-tests--with-temp-file file-name 177 (lread-tests--with-temp-file file-name
178 (write-region "(` (a b))" nil file-name) 178 (write-region "(` (a b))" nil file-name)
179 (should (equal (load file-name nil :nomessage :nosuffix) t)) 179 (let ((data (should-error (load file-name nil :nomessage :nosuffix))))
180 (should (equal (lread-tests--last-message) 180 (should (equal (cdr data)
181 (concat (format-message "Loading `%s': " file-name) 181 (list (concat (format-message "Loading `%s': " file-name)
182 "old-style backquotes detected!"))))) 182 "old-style backquotes detected!")))))))
183 183
184(ert-deftest lread-lread--substitute-object-in-subtree () 184(ert-deftest lread-lread--substitute-object-in-subtree ()
185 (let ((x (cons 0 1))) 185 (let ((x (cons 0 1)))