submodule sync: skip work for inactive submodules
[gitweb.git] / t / t6302-for-each-ref-filter.sh
index fed30133d4984c2c292807302a182422aa27305d..a09a1a46eff5357c3939f5715f4a623effcb6428 100755 (executable)
@@ -403,4 +403,22 @@ test_expect_success 'ignore spaces in %(if) atom usage' '
        test_cmp expect actual
 '
 
+test_expect_success 'check %(if:equals=<string>)' '
+       git for-each-ref --format="%(if:equals=master)%(refname:short)%(then)Found master%(else)Not master%(end)" refs/heads/ >actual &&
+       cat >expect <<-\EOF &&
+       Found master
+       Not master
+       EOF
+       test_cmp expect actual
+'
+
+test_expect_success 'check %(if:notequals=<string>)' '
+       git for-each-ref --format="%(if:notequals=master)%(refname:short)%(then)Not master%(else)Found master%(end)" refs/heads/ >actual &&
+       cat >expect <<-\EOF &&
+       Found master
+       Not master
+       EOF
+       test_cmp expect actual
+'
+
 test_done