From f57a8715bc5f50234dd1f756b3b26a0b81c3784c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 21 Jul 2014 15:09:27 -0700 Subject: test prerequisites: eradicate NOT_FOO Support for Back when bdccd3c1 (test-lib: allow negation of prerequisites, 2012-11-14) introduced negated predicates (e.g. "!MINGW,!CYGWIN"), we already had 5 test files that use NOT_MINGW (and a few MINGW) as prerequisites. Let's not add NOT_FOO and rewrite existing ones as !FOO for both MINGW and CYGWIN. Signed-off-by: Junio C Hamano --- t/t1402-check-ref-format.sh | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 't/t1402-check-ref-format.sh') diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh index 9aeb352b3d..28e93186ab 100755 --- a/t/t1402-check-ref-format.sh +++ b/t/t1402-check-ref-format.sh @@ -7,7 +7,7 @@ test_description='Test git check-ref-format' valid_ref() { prereq= case $1 in - [A-Z]*) + [A-Z!]*) prereq=$1 shift esac @@ -19,7 +19,7 @@ valid_ref() { invalid_ref() { prereq= case $1 in - [A-Z]*) + [A-Z!]*) prereq=$1 shift esac @@ -30,17 +30,17 @@ invalid_ref() { } invalid_ref '' -invalid_ref NOT_MINGW '/' -invalid_ref NOT_MINGW '/' --allow-onelevel -invalid_ref NOT_MINGW '/' --normalize -invalid_ref NOT_MINGW '/' '--allow-onelevel --normalize' +invalid_ref !MINGW '/' +invalid_ref !MINGW '/' --allow-onelevel +invalid_ref !MINGW '/' --normalize +invalid_ref !MINGW '/' '--allow-onelevel --normalize' valid_ref 'foo/bar/baz' valid_ref 'foo/bar/baz' --normalize invalid_ref 'refs///heads/foo' valid_ref 'refs///heads/foo' --normalize invalid_ref 'heads/foo/' -invalid_ref NOT_MINGW '/heads/foo' -valid_ref NOT_MINGW '/heads/foo' --normalize +invalid_ref !MINGW '/heads/foo' +valid_ref !MINGW '/heads/foo' --normalize invalid_ref '///heads/foo' valid_ref '///heads/foo' --normalize invalid_ref './foo' @@ -120,14 +120,14 @@ invalid_ref "$ref" --refspec-pattern invalid_ref "$ref" '--refspec-pattern --allow-onelevel' ref='/foo' -invalid_ref NOT_MINGW "$ref" -invalid_ref NOT_MINGW "$ref" --allow-onelevel -invalid_ref NOT_MINGW "$ref" --refspec-pattern -invalid_ref NOT_MINGW "$ref" '--refspec-pattern --allow-onelevel' -invalid_ref NOT_MINGW "$ref" --normalize -valid_ref NOT_MINGW "$ref" '--allow-onelevel --normalize' -invalid_ref NOT_MINGW "$ref" '--refspec-pattern --normalize' -valid_ref NOT_MINGW "$ref" '--refspec-pattern --allow-onelevel --normalize' +invalid_ref !MINGW "$ref" +invalid_ref !MINGW "$ref" --allow-onelevel +invalid_ref !MINGW "$ref" --refspec-pattern +invalid_ref !MINGW "$ref" '--refspec-pattern --allow-onelevel' +invalid_ref !MINGW "$ref" --normalize +valid_ref !MINGW "$ref" '--allow-onelevel --normalize' +invalid_ref !MINGW "$ref" '--refspec-pattern --normalize' +valid_ref !MINGW "$ref" '--refspec-pattern --allow-onelevel --normalize' valid_ref 'refs/heads/a-very-long-refname' @@ -176,7 +176,7 @@ test_expect_success 'check-ref-format --branch from subdir' ' valid_ref_normalized() { prereq= case $1 in - [A-Z]*) + [A-Z!]*) prereq=$1 shift esac @@ -188,7 +188,7 @@ valid_ref_normalized() { invalid_ref_normalized() { prereq= case $1 in - [A-Z]*) + [A-Z!]*) prereq=$1 shift esac @@ -199,10 +199,10 @@ invalid_ref_normalized() { valid_ref_normalized 'heads/foo' 'heads/foo' valid_ref_normalized 'refs///heads/foo' 'refs/heads/foo' -valid_ref_normalized NOT_MINGW '/heads/foo' 'heads/foo' +valid_ref_normalized !MINGW '/heads/foo' 'heads/foo' valid_ref_normalized '///heads/foo' 'heads/foo' invalid_ref_normalized 'foo' -invalid_ref_normalized NOT_MINGW '/foo' +invalid_ref_normalized !MINGW '/foo' invalid_ref_normalized 'heads/foo/../bar' invalid_ref_normalized 'heads/./foo' invalid_ref_normalized 'heads\foo' -- cgit v1.2.3