diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-05 19:36:23 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-05 19:36:23 (GMT) |
commit | 1077bf1ff676cd172a09b88204422228f21d7cbf (patch) | |
tree | 09198a4933da76f03c78ab6c088999a1e2fe0ce1 /t/t3203-branch-output.sh | |
parent | 3c18ee72cc2f3d0024b7314cdb1af5d41aea136a (diff) | |
parent | 376eb14a05f693378047eee36a10035c122f0261 (diff) | |
download | git-1077bf1ff676cd172a09b88204422228f21d7cbf.zip git-1077bf1ff676cd172a09b88204422228f21d7cbf.tar.gz git-1077bf1ff676cd172a09b88204422228f21d7cbf.tar.bz2 |
Merge branch 'mg/branch-list'
* mg/branch-list:
t3200: clean up checks for file existence
branch: -v does not automatically imply --list
branch: allow pattern arguments
branch: introduce --list option
git-branch: introduce missing long forms for the options
git-tag: introduce long forms for the options
t6040: test branch -vv
Conflicts:
Documentation/git-tag.txt
t/t3200-branch.sh
Diffstat (limited to 't/t3203-branch-output.sh')
-rwxr-xr-x | t/t3203-branch-output.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh index 6b7c118..76fe7e0 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,6 +81,20 @@ 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 |