X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3203-branch-output.sh;h=76fe7e0060c20507cb6eb317451b69a2a0c9146d;hb=200888ef3bbc150cc20b99e0aa039c751c00e07a;hp=6b7c118e4fcbf3855318b2e9e3b721d07950fd25;hpb=916034b93ce45bdedfb1c5cef270e6eba2a26fea;p=git.git diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh index 6b7c118e4..76fe7e006 100755 --- a/t/t3203-branch-output.sh +++ b/t/t3203-branch-output.sh @@ -32,6 +32,20 @@ test_expect_success 'git branch shows local branches' ' test_cmp expect actual ' +test_expect_success 'git branch --list shows local branches' ' + git branch --list >actual && + test_cmp expect actual +' + +cat >expect <<'EOF' + branch-one + branch-two +EOF +test_expect_success 'git branch --list pattern shows matching local branches' ' + git branch --list branch* >actual && + test_cmp expect actual +' + cat >expect <<'EOF' origin/HEAD -> origin/branch-one origin/branch-one @@ -66,6 +80,20 @@ test_expect_success 'git branch -v shows branch summaries' ' test_cmp expect actual ' +cat >expect <<'EOF' +two +one +EOF +test_expect_success 'git branch --list -v pattern shows branch summaries' ' + git branch --list -v branch* >tmp && + awk "{print \$NF}" actual && + test_cmp expect actual +' + +test_expect_success 'git branch -v pattern does not show branch summaries' ' + test_must_fail git branch -v branch* +' + cat >expect <<'EOF' * (no branch) branch-one