]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix vacuous conf-mode-test
authorMattias Engdegård <mattiase@acm.org>
Mon, 31 Jul 2023 16:52:49 +0000 (18:52 +0200)
committerMattias Engdegård <mattiase@acm.org>
Tue, 1 Aug 2023 08:26:51 +0000 (10:26 +0200)
* 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

index 5e21d2cfacb485ef4ea855e40cb3ea41ae6bdc71..1f6d9b6b587da9d9a1a9be16dc69e46fea2bc019 100644 (file)
@@ -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.