From d8d33736b53fb0bef68ca30a64bf7f9ecd872115 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Sun, 28 Aug 2011 16:54:32 +0200 Subject: branch: allow pattern arguments Allow pattern arguments for the list mode just like for git tag -l. Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- t/t3203-branch-output.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 't/t3203-branch-output.sh') 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 @@ -37,6 +37,15 @@ test_expect_success 'git branch --list shows local branches' ' 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 @@ -71,6 +80,16 @@ test_expect_success 'git branch -v shows branch summaries' ' test_cmp expect actual ' +cat >expect <<'EOF' +two +one +EOF +test_expect_success 'git branch -v pattern shows branch summaries' ' + git branch -v branch* >tmp && + awk "{print \$NF}" actual && + test_cmp expect actual +' + cat >expect <<'EOF' * (no branch) branch-one -- cgit v1.2.1