From f5932bcd425e0b3da81ce3d719413e2f824c3c0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Mon, 31 Jul 2023 18:52:49 +0200 Subject: [PATCH] Fix vacuous conf-mode-test * test/lisp/textmodes/conf-mode-tests.el (conf-test-javaprop-mode): Attempt to give the test some meaning by repairing regexps, and fixing it so that it passes. --- test/lisp/textmodes/conf-mode-tests.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/lisp/textmodes/conf-mode-tests.el b/test/lisp/textmodes/conf-mode-tests.el index 5e21d2cfacb..1f6d9b6b587 100644 --- a/test/lisp/textmodes/conf-mode-tests.el +++ b/test/lisp/textmodes/conf-mode-tests.el @@ -93,12 +93,13 @@ x.2.y.1.z.2.zz =") (should (equal (face-at-point) 'font-lock-variable-name-face)) (search-forward "val") (should-not (face-at-point))) - (while (re-search-forward "a-z" nil t) + (while (re-search-forward "[xyz]" nil t) (backward-char) (should (equal (face-at-point) 'font-lock-variable-name-face)) - (re-search-forward "[0-0]" nil t) - (backward-char) - (should (equal (face-at-point) 'font-lock-constant-face))))) + (forward-char) + (when (re-search-forward "[0-9]" nil t) + (backward-char) + (should (equal (face-at-point) 'font-lock-constant-face)))))) (ert-deftest conf-test-space-mode () ;; From `conf-space-mode' docstring. -- 2.39.2