From: Gerd Möllmann Date: Fri, 21 Oct 2022 15:35:56 +0000 (+0200) Subject: Make lisp/progmodes/elisp-mode-tests succeed X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=048aa627e4147bec909b9d106093676d0c79b9ac;p=emacs.git Make lisp/progmodes/elisp-mode-tests succeed Shorthands are not supported with packages. Add :expected-result accordingly. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer): (elisp-shorthand-read-from-string): (elisp-shorthand-load-a-file): (elisp-shorthand-byte-compile-a-file): (elisp-shorthand-completion-at-point): (elisp-shorthand-escape): (elisp-dont-shadow-punctuation-only-symbols): Expect to fail if (featurep 'symbol-packages). --- diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index e73be0db504..243e2cd0b66 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -1037,6 +1037,7 @@ evaluation of BODY." (ert-deftest elisp-shorthand-read-buffer () + :expected-result (if (featurep 'symbol-packages) :failed :passed) (let* ((gsym (downcase (symbol-name (cl-gensym "sh-")))) (shorthand-sname (format "s-%s" gsym)) (expected (intern (format "shorthand-longhand-%s" gsym)))) @@ -1051,6 +1052,7 @@ evaluation of BODY." (should (not (intern-soft shorthand-sname))))) (ert-deftest elisp-shorthand-read-from-string () + :expected-result (if (featurep 'symbol-packages) :failed :passed) (let* ((gsym (downcase (symbol-name (cl-gensym "sh-")))) (shorthand-sname (format "s-%s" gsym)) (expected (intern (format "shorthand-longhand-%s" gsym)))) @@ -1062,6 +1064,7 @@ evaluation of BODY." (should (not (intern-soft shorthand-sname))))) (ert-deftest elisp-shorthand-load-a-file () + :expected-result (if (featurep 'symbol-packages) :failed :passed) (let ((test-file (ert-resource-file "simple-shorthand-test.el"))) (mapatoms (lambda (s) (when (string-match "^elisp--foo-" (symbol-name s)) @@ -1071,7 +1074,7 @@ evaluation of BODY." (should-not (intern-soft "f-test")))) (ert-deftest elisp-shorthand-byte-compile-a-file () - + :expected-result (if (featurep 'symbol-packages) :failed :passed) (let ((test-file (ert-resource-file "simple-shorthand-test.el")) (byte-compiled (ert-resource-file "simple-shorthand-test.elc"))) (mapatoms (lambda (s) @@ -1086,6 +1089,7 @@ evaluation of BODY." (should-not (intern-soft "f-test")))) (ert-deftest elisp-shorthand-completion-at-point () + :expected-result (if (featurep 'symbol-packages) :failed :passed) (let ((test-file (ert-resource-file "simple-shorthand-test.el"))) (load test-file) (with-current-buffer (find-file-noselect test-file) @@ -1101,6 +1105,7 @@ evaluation of BODY." (revert-buffer t t)))) (ert-deftest elisp-shorthand-escape () + :expected-result (if (featurep 'symbol-packages) :failed :passed) (let ((test-file (ert-resource-file "simple-shorthand-test.el"))) (load test-file) (should (intern-soft "f-test4---")) @@ -1109,6 +1114,7 @@ evaluation of BODY." (should (unintern "f-test4---")))) (ert-deftest elisp-dont-shadow-punctuation-only-symbols () + :expected-result (if (featurep 'symbol-packages) :failed :passed) (let* ((shorthanded-form '(/= 42 (-foo 42))) (expected-longhand-form '(/= 42 (fooey-foo 42))) (observed (let ((read-symbol-shorthands