aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBasil L. Contovounesios2025-02-20 10:29:54 +0100
committerBasil L. Contovounesios2025-02-25 11:02:55 +0100
commit02c830ba22b0564f6725cd403beba4accb836061 (patch)
treeb7e74c0a1b57b0b2c9d4eaab61766a6cde91b249 /doc
parent0c6b8643aec24935f82c63d43219f26378e3e578 (diff)
downloademacs-02c830ba22b0564f6725cd403beba4accb836061.tar.gz
emacs-02c830ba22b0564f6725cd403beba4accb836061.zip
Fix ert-font-lock macro signatures
* doc/misc/ert.texi (Syntax Highlighting Tests): * test/lisp/emacs-lisp/ert-font-lock-tests.el (test-line-comment-p--emacs-lisp, test-line-comment-p--shell-script) (test-line-comment-p--javascript, test-line-comment-p--python) (test-line-comment-p--c, test-macro-test--correct-highlighting) (test-macro-test--docstring, test-macro-test--failing) (test-macro-test--file, test-macro-test--file-no-asserts) (test-macro-test--file-failing): Reindent macro calls. (with-temp-buffer-str-mode): Evaluate macro arguments left-to-right. (ert-font-lock--wrap-begin-end): Use rx for more robust composition. (test-line-comment-p--php): Require that php-mode is callable, not already loaded. * lisp/emacs-lisp/ert-font-lock.el (ert-font-lock-deftest) (ert-font-lock-deftest-file): NAME is not followed by an empty list like in ert-deftest, so the optional DOCSTRING is actually the second argument. Adapt calling convention in docstring, and debug, doc-string, and indent properties accordingly (bug#76372). Fix docstring grammar, document MAJOR-MODE, and avoid referring to a file name as a path.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/ert.texi10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 9e60647f3ba..e0cc415fa93 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -955,7 +955,7 @@ checking face assignment. Test assertions are included in code-level
955comments directly and can be read either from inline strings or files. 955comments directly and can be read either from inline strings or files.
956The parser expects the input string to contain at least one assertion. 956The parser expects the input string to contain at least one assertion.
957 957
958Test assertion parser extracts tests from comment-only lines. Every 958The test assertion parser extracts tests from comment-only lines. Every
959comment assertion line starts either with a caret (@samp{^}) or an arrow 959comment assertion line starts either with a caret (@samp{^}) or an arrow
960(@samp{<-}). A single caret/arrow or carets should be followed 960(@samp{<-}). A single caret/arrow or carets should be followed
961immediately by the name of a face or a list of faces to be checked 961immediately by the name of a face or a list of faces to be checked
@@ -977,7 +977,7 @@ var variable = 11;
977@end example 977@end example
978 978
979Both symbol-only @code{:face} property values and assertion face values 979Both symbol-only @code{:face} property values and assertion face values
980are normalized to single element lists so assertions below are 980are normalized to single element lists so the assertions below are
981equivalent: 981equivalent:
982 982
983@example 983@example
@@ -1054,7 +1054,7 @@ definition:
1054 1054
1055@lisp 1055@lisp
1056(ert-font-lock-deftest test-macro-test--inline 1056(ert-font-lock-deftest test-macro-test--inline
1057 emacs-lisp-mode 1057 emacs-lisp-mode
1058 " 1058 "
1059(defun fun ()) 1059(defun fun ())
1060;; ^ font-lock-keyword-face 1060;; ^ font-lock-keyword-face
@@ -1068,13 +1068,13 @@ file:
1068 1068
1069@lisp 1069@lisp
1070(ert-font-lock-deftest-file test-macro-test--file 1070(ert-font-lock-deftest-file test-macro-test--file
1071 "Test reading correct assertions from a file" 1071 "Test reading correct assertions from a file."
1072 javascript-mode 1072 javascript-mode
1073 "correct.js") 1073 "correct.js")
1074@end lisp 1074@end lisp
1075 1075
1076The @code{ert-font-lock-deftest} and @code{ert-font-lock-deftest-file} 1076The @code{ert-font-lock-deftest} and @code{ert-font-lock-deftest-file}
1077macros accept the same keyword parameters as @code{ert-deftest} i.e., 1077macros accept the same keyword arguments as @code{ert-deftest}, i.e.,
1078@code{:tag} and @code{:expected-result}. 1078@code{:tag} and @code{:expected-result}.
1079 1079
1080@node How to Debug Tests 1080@node How to Debug Tests