]> git.eshelyaron.com Git - emacs.git/commitdiff
Add new failing test for bug#51089
authorJoão Távora <joaotavora@gmail.com>
Sun, 10 Oct 2021 11:03:15 +0000 (12:03 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sun, 10 Oct 2021 13:29:37 +0000 (14:29 +0100)
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-dont-shadow-punctuation-only-symbols): Add new failing test.

test/lisp/progmodes/elisp-mode-tests.el

index ad39cebfc8bafb650a2a05c3320d2c781a288ae5..e816d3c1b029557309c8edd6a6dcad699c533581 100644 (file)
@@ -1093,6 +1093,18 @@ evaluation of BODY."
     (should (= 84 (funcall (intern-soft "f-test4---"))))
     (should (unintern "f-test4---"))))
 
+(ert-deftest elisp-dont-shadow-punctuation-only-symbols ()
+  :expected-result :failed ;  bug#51089
+  (let* ((shorthanded-form '(- 42 (-foo 42)))
+         (expected-longhand-form '(- 42 (fooey-foo 42)))
+         (observed (let ((read-symbol-shorthands
+                          '(("-" . "fooey-"))))
+                     (car (read-from-string
+                           (with-temp-buffer
+                             (print shorthanded-form (current-buffer))
+                             (buffer-string)))))))
+    (should (equal observed expected-longhand-form))))
+
 (ert-deftest test-cl-flet-indentation ()
   :expected-result :failed              ; FIXME: bug#9622
   (should (equal