summaryrefslogtreecommitdiff
path: root/t/t3203-branch-output.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-05 19:36:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-05 19:36:23 (GMT)
commit1077bf1ff676cd172a09b88204422228f21d7cbf (patch)
tree09198a4933da76f03c78ab6c088999a1e2fe0ce1 /t/t3203-branch-output.sh
parent3c18ee72cc2f3d0024b7314cdb1af5d41aea136a (diff)
parent376eb14a05f693378047eee36a10035c122f0261 (diff)
downloadgit-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-xt/t3203-branch-output.sh28
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