testmark-bash

testmarktest_rule_basic: say what TESTMARK_RAW_ERRORS is for: output of the case's own that the relabeling would rewrite.

commit 29c582aab1c2e520fdb384c7cced8b5bf3b761ac · parent 1c29154087 · browse this tree
Ximianth, 2026-10-25 11:37:11 UTC

diff --git a/lib/testmark.bash b/lib/testmark.bash
index 2fd5523..d4d7590 100644
--- a/lib/testmark.bash
+++ b/lib/testmark.bash
@@ -108,7 +108,8 @@ testmark_check() { _testmark_call _testmark_check "$@"; }
 ##
 ## Bash's own runtime error messages from inside these functions (a command not found, an unbound variable) are relabeled in the output:
 ## `FN: message`, with no path and no line number, so the text is the same wherever the test runs.
-## Set TESTMARK_RAW_ERRORS, to any value, to keep bash's text verbatim instead.
+## The relabeling matches lines by their text, so output of the case's own that happens to look like such an error gets relabeled too.
+## For that, set TESTMARK_RAW_ERRORS, to any value, and the output is checked exactly as printed.
 ##
 ## - @param $1 GLOB: a bash pattern, matched against whole hunk names; `*` matches `/` too.
 ## - @param $2 FN: the name of a defined function.