t6135: attr magic with path pattern
The test coverage on attribute magic combined with path pattern was a bit thin. Let's add a few and make sure "(attr:X)sub" and "(attr:X)sub/" behave the same. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -78,7 +78,17 @@ test_expect_success 'check specific set attr' '
|
|||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'check specific set attr (2)' '
|
test_expect_success 'check set attr with pathspec pattern' '
|
||||||
|
echo sub/fileSetLabel >expect &&
|
||||||
|
|
||||||
|
git ls-files ":(attr:label)sub" >actual &&
|
||||||
|
test_cmp expect actual &&
|
||||||
|
|
||||||
|
git ls-files ":(attr:label)sub/" >actual &&
|
||||||
|
test_cmp expect actual
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'check specific set attr in tree-ish' '
|
||||||
cat <<-\EOF >expect &&
|
cat <<-\EOF >expect &&
|
||||||
HEAD:fileSetLabel
|
HEAD:fileSetLabel
|
||||||
HEAD:sub/fileSetLabel
|
HEAD:sub/fileSetLabel
|
||||||
@ -87,6 +97,16 @@ test_expect_success 'check specific set attr (2)' '
|
|||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'check specific set attr with pathspec pattern in tree-ish' '
|
||||||
|
echo HEAD:sub/fileSetLabel >expect &&
|
||||||
|
|
||||||
|
git grep -l content HEAD ":(attr:label)sub" >actual &&
|
||||||
|
test_cmp expect actual &&
|
||||||
|
|
||||||
|
git grep -l content HEAD ":(attr:label)sub/" >actual &&
|
||||||
|
test_cmp expect actual
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success 'check specific unset attr' '
|
test_expect_success 'check specific unset attr' '
|
||||||
cat <<-\EOF >expect &&
|
cat <<-\EOF >expect &&
|
||||||
fileUnsetLabel
|
fileUnsetLabel
|
||||||
|
Reference in New Issue
Block a user