summaryrefslogtreecommitdiff
path: root/t/t3406-rebase-message.sh
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martinvonz@gmail.com>2013-06-07 06:11:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-07 16:42:20 (GMT)
commit9e2248efdbc0327d1eee19d3b8e825e43f7df81f (patch)
treee6b6b919e65d1a9bb1a607272c1aa9ba77992de4 /t/t3406-rebase-message.sh
parent3f213981e44a9109d053550855dc0ae91d0287c6 (diff)
downloadgit-9e2248efdbc0327d1eee19d3b8e825e43f7df81f.zip
git-9e2248efdbc0327d1eee19d3b8e825e43f7df81f.tar.gz
git-9e2248efdbc0327d1eee19d3b8e825e43f7df81f.tar.bz2
t3406: modernize style
Update the following: - Quote 'setup' - Remove blank lines within test case body - Use test_commit instead of custom quick_one - Create branch "topic" from tag created by test_commit Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3406-rebase-message.sh')
-rwxr-xr-xt/t3406-rebase-message.sh30
1 files changed, 9 insertions, 21 deletions
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
index e6a9a0d..fe8c27f 100755
--- a/t/t3406-rebase-message.sh
+++ b/t/t3406-rebase-message.sh
@@ -4,27 +4,17 @@ test_description='messages from rebase operation'
. ./test-lib.sh
-quick_one () {
- echo "$1" >"file$1" &&
- git add "file$1" &&
- test_tick &&
- git commit -m "$1"
-}
+test_expect_success 'setup' '
+ test_commit O fileO &&
+ test_commit X fileX &&
+ test_commit A fileA &&
+ test_commit B fileB &&
+ test_commit Y fileY &&
-test_expect_success setup '
- quick_one O &&
- git branch topic &&
- quick_one X &&
- quick_one A &&
- quick_one B &&
- quick_one Y &&
-
- git checkout topic &&
- quick_one A &&
- quick_one B &&
- quick_one Z &&
+ git checkout -b topic O &&
+ git cherry-pick A B &&
+ test_commit Z fileZ &&
git tag start
-
'
cat >expect <<\EOF
@@ -34,12 +24,10 @@ Committed: 0003 Z
EOF
test_expect_success 'rebase -m' '
-
git rebase -m master >report &&
sed -n -e "/^Already applied: /p" \
-e "/^Committed: /p" report >actual &&
test_cmp expect actual
-
'
test_expect_success 'rebase --stat' '