diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2011-08-28 16:54:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-28 22:58:00 -0700 |
commit | d8d33736b53fb0bef68ca30a64bf7f9ecd872115 (patch) | |
tree | d2386494dee2899eb73e7a17040ff2e55999aba6 /t/t3203-branch-output.sh | |
parent | cddd127b9afe3aa516aafdc38e9a8778f1340e0d (diff) | |
download | git-d8d33736b53fb0bef68ca30a64bf7f9ecd872115.tar.gz |
branch: allow pattern arguments
Allow pattern arguments for the list mode just like for git tag -l.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3203-branch-output.sh')
-rwxr-xr-x | t/t3203-branch-output.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh index 97d10b1884..f2b294b144 100755 --- a/t/t3203-branch-output.sh +++ b/t/t3203-branch-output.sh @@ -38,6 +38,15 @@ test_expect_success 'git branch --list shows local branches' ' ' 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 origin/branch-two @@ -72,6 +81,16 @@ test_expect_success 'git branch -v shows branch summaries' ' ' cat >expect <<'EOF' +two +one +EOF +test_expect_success 'git branch -v pattern shows branch summaries' ' + git branch -v branch* >tmp && + awk "{print \$NF}" <tmp >actual && + test_cmp expect actual +' + +cat >expect <<'EOF' * (no branch) branch-one branch-two |