diff options
Diffstat (limited to 't/t3203-branch-output.sh')
-rwxr-xr-x | t/t3203-branch-output.sh | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh index 4ef7d09115..76fe7e0060 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 @@ -67,15 +81,29 @@ test_expect_success 'git branch -v shows branch summaries' ' ' 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}" <tmp >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 branch-two master EOF -test_expect_success C_LOCALE_OUTPUT 'git branch shows detached HEAD properly' ' +test_expect_success 'git branch shows detached HEAD properly' ' git checkout HEAD^0 && git branch >actual && - test_cmp expect actual + test_i18ncmp expect actual ' test_done |