* [PATCH 3/1] Add tests for `branch --[no-]merged`
@ 2008-04-18 16:30 Lars Hjemli
0 siblings, 0 replies; only message in thread
From: Lars Hjemli @ 2008-04-18 16:30 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---
A bit late, but here's a testscript for the new options (shamelessly based
on t3201).
t/t3202-branch-merged.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 68 insertions(+), 0 deletions(-)
create mode 100755 t/t3202-branch-merged.sh
diff --git a/t/t3202-branch-merged.sh b/t/t3202-branch-merged.sh
new file mode 100755
index 0000000..2710923
--- /dev/null
+++ b/t/t3202-branch-merged.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+test_description='branch --merged/--no-merged'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+ >file &&
+ git add file &&
+ test_tick &&
+ git commit -m initial &&
+ git branch side &&
+
+ echo 1 >file &&
+ test_tick &&
+ git commit -a -m "second on master" &&
+
+ git checkout side &&
+ echo 1 >file &&
+ test_tick &&
+ git commit -a -m "second on side" &&
+
+ git merge master
+
+'
+
+test_expect_success 'side: branch --merged' '
+
+ git branch --merged >actual &&
+ {
+ echo " master" &&
+ echo "* side"
+ } >expect &&
+ test_cmp expect actual
+
+'
+
+test_expect_success 'side: branch --no-merged' '
+
+ git branch --no-merged >actual &&
+ >expect &&
+ test_cmp expect actual
+
+'
+
+test_expect_success 'master: branch --merged' '
+
+ git checkout master &&
+ git branch --merged >actual &&
+ {
+ echo "* master"
+ } >expect &&
+ test_cmp expect actual
+
+'
+
+test_expect_success 'master: branch --no-merged' '
+
+ git branch --no-merged >actual &&
+ {
+ echo " side"
+ } >expect &&
+ test_cmp expect actual
+
+'
+
+test_done
--
1.5.5.74.g74a72
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-18 16:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-18 16:30 [PATCH 3/1] Add tests for `branch --[no-]merged` Lars Hjemli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).