]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t7810: turn MB_REGEX check into a lazy prereq
authorPatrick Steinhardt <ps@pks.im>
Thu, 4 Jun 2026 10:07:35 +0000 (12:07 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Jun 2026 12:49:00 +0000 (21:49 +0900)
In t7810 we verify whether the system has proper multibyte locale
support by executing `test-tool regex` with a unicode character. When
this check fails though we'll output an error that breaks the TAP
format.

Fix this issue by turning the logic into a lazy prerequisite.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7810-grep.sh

index 1b195bee599a37872a40d502b2e86ccf47725afc..d61c4a4d73c390ab2206c2d0f66c6e7cb84a1a0d 100755 (executable)
@@ -18,8 +18,9 @@ test_invalid_grep_expression() {
        '
 }
 
-LC_ALL=en_US.UTF-8 test-tool regex '^.$' '¿' &&
-  test_set_prereq MB_REGEX
+test_lazy_prereq MB_REGEX '
+       LC_ALL=en_US.UTF-8 test-tool regex "^.$" "¿"
+'
 
 cat >hello.c <<EOF
 #include <assert.h>