diff mbox series

[v3,19/35] userdiff tests: do not do compile tests on "custom" pattern

Message ID 20210224195129.4004-20-avarab@gmail.com (mailing list archive)
State New
Headers show
Series userdiff: refactor + test + doc + misc improvements | expand

Commit Message

Ævar Arnfjörð Bjarmason Feb. 24, 2021, 7:51 p.m. UTC
Since f1b75fbaf1 (t4018: convert custom pattern test to the new
infrastructure, 2014-03-21) we have been doing the basic sanity check
of whether patterns in userdiff.c compile on the "custom" patterns.

That we were doing this was an emergent effect of that change and an
earlier refactoring in bfa7d01413 (t4018: an infrastructure to test
hunk headers, 2014-03-21).

This was never intended by the test added in
e3bf5e43fd (t4018-diff-funcname: test syntax of builtin xfuncname
patterns, 2008-09-22), nor is there any point in doing this. We'll
error out in the custom.sh test itself if those patterns don't

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
 t/t4018-diff-funcname.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series


diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 71a7b474cd4..b80546b4d7f 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -20,12 +20,7 @@  test_expect_success 'setup' '
 	echo B >B.java
-	$(cat builtin-drivers)
-	custom
-for p in $diffpatterns
+for p in $(cat builtin-drivers)
 	test_expect_success "builtin $p pattern compiles" '
 		echo "*.java diff=$p" >.gitattributes &&
@@ -50,6 +45,11 @@  test_expect_success 'last regexp must not be negated' '
 	test_i18ngrep ": Last expression must not be negated:" msg
+	$(cat builtin-drivers)
+	custom
 test_expect_success 'setup hunk header tests' '
 	for i in $diffpatterns