summaryrefslogtreecommitdiff
path: root/test/lisp/textmodes
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/textmodes')
-rw-r--r--test/lisp/textmodes/conf-mode-tests.el26
-rw-r--r--test/lisp/textmodes/fill-tests.el2
-rw-r--r--test/lisp/textmodes/reftex-tests.el3
-rw-r--r--test/lisp/textmodes/tildify-tests.el2
4 files changed, 25 insertions, 8 deletions
diff --git a/test/lisp/textmodes/conf-mode-tests.el b/test/lisp/textmodes/conf-mode-tests.el
index 03fdff1c367..343342be886 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.
@@ -157,7 +158,6 @@ image/tiff tiff tif
(should-not (face-at-point))))
(ert-deftest conf-test-toml-mode ()
- ;; From `conf-toml-mode' docstring.
(with-temp-buffer
(insert "[entry]
value = \"some string\"")
@@ -173,6 +173,22 @@ value = \"some string\"")
(search-forward "som")
(should (equal (face-at-point) 'font-lock-string-face))))
+(ert-deftest conf-test-toml-mode/boolean ()
+ ;; https://toml.io/en/v1.0.0#boolean
+ (with-temp-buffer
+ (insert "[entry]
+a = true
+b = True")
+ (goto-char (point-min))
+ (conf-toml-mode)
+ (font-lock-mode)
+ (font-lock-ensure)
+ (search-forward "tru")
+ (should (equal (face-at-point) 'font-lock-keyword-face))
+ ;; Do not fontify upper-case "True".
+ (search-forward "Tru")
+ (should (equal (face-at-point) nil))))
+
(ert-deftest conf-test-desktop-mode ()
;; From `conf-desktop-mode' dostring.
(with-temp-buffer
diff --git a/test/lisp/textmodes/fill-tests.el b/test/lisp/textmodes/fill-tests.el
index 36396b1e999..484f6ed395b 100644
--- a/test/lisp/textmodes/fill-tests.el
+++ b/test/lisp/textmodes/fill-tests.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
;; Author: Marcin Borkowski <mbork@mbork.pl>
-;; Keywords: text, wp
+;; Keywords: text
;; This file is part of GNU Emacs.
diff --git a/test/lisp/textmodes/reftex-tests.el b/test/lisp/textmodes/reftex-tests.el
index adbd2b73ed6..7f7c99a40a4 100644
--- a/test/lisp/textmodes/reftex-tests.el
+++ b/test/lisp/textmodes/reftex-tests.el
@@ -294,7 +294,8 @@ And this should be % \\cite{ignored}.
(find-file tex-file)
(setq keys (reftex-all-used-citation-keys))
(should (equal (sort keys #'string<)
- (sort '(;; Standard commands:
+ (sort (list
+ ;; Standard commands:
"cite:2022" "Cite:2022"
"parencite:2022" "Parencite:2022"
"footcite:2022" "footcitetext:2022"
diff --git a/test/lisp/textmodes/tildify-tests.el b/test/lisp/textmodes/tildify-tests.el
index 0da0a688974..b6bdae5edd5 100644
--- a/test/lisp/textmodes/tildify-tests.el
+++ b/test/lisp/textmodes/tildify-tests.el
@@ -4,7 +4,7 @@
;; Author: Michal Nazarewicz <mina86@mina86.com>
;; Version: 4.5
-;; Keywords: text, TeX, SGML, wp
+;; Keywords: text, TeX, SGML
;; This file is part of GNU Emacs.