summaryrefslogtreecommitdiff
path: root/t/t6302-for-each-ref-filter.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t6302-for-each-ref-filter.sh')
-rwxr-xr-xt/t6302-for-each-ref-filter.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t6302-for-each-ref-filter.sh b/t/t6302-for-each-ref-filter.sh
index a09a1a4..fc067ed 100755
--- a/t/t6302-for-each-ref-filter.sh
+++ b/t/t6302-for-each-ref-filter.sh
@@ -93,6 +93,22 @@ test_expect_success 'filtering with --contains' '
test_cmp expect actual
'
+test_expect_success 'filtering with --no-contains' '
+ cat >expect <<-\EOF &&
+ refs/tags/one
+ EOF
+ git for-each-ref --format="%(refname)" --no-contains=two >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'filtering with --contains and --no-contains' '
+ cat >expect <<-\EOF &&
+ refs/tags/two
+ EOF
+ git for-each-ref --format="%(refname)" --contains=two --no-contains=three >actual &&
+ test_cmp expect actual
+'
+
test_expect_success '%(color) must fail' '
test_must_fail git for-each-ref --format="%(color)%(refname)"
'
@@ -421,4 +437,8 @@ test_expect_success 'check %(if:notequals=<string>)' '
test_cmp expect actual
'
+test_expect_success '--merged is incompatible with --no-merged' '
+ test_must_fail git for-each-ref --merged HEAD --no-merged HEAD
+'
+
test_done