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>
This commit is contained in:
parent
3f213981e4
commit
9e2248efdb
@ -4,27 +4,17 @@ test_description='messages from rebase operation'
|
|||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
quick_one () {
|
test_expect_success 'setup' '
|
||||||
echo "$1" >"file$1" &&
|
test_commit O fileO &&
|
||||||
git add "file$1" &&
|
test_commit X fileX &&
|
||||||
test_tick &&
|
test_commit A fileA &&
|
||||||
git commit -m "$1"
|
test_commit B fileB &&
|
||||||
}
|
test_commit Y fileY &&
|
||||||
|
|
||||||
test_expect_success setup '
|
git checkout -b topic O &&
|
||||||
quick_one O &&
|
git cherry-pick A B &&
|
||||||
git branch topic &&
|
test_commit Z fileZ &&
|
||||||
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 tag start
|
git tag start
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
cat >expect <<\EOF
|
cat >expect <<\EOF
|
||||||
@ -34,12 +24,10 @@ Committed: 0003 Z
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_expect_success 'rebase -m' '
|
test_expect_success 'rebase -m' '
|
||||||
|
|
||||||
git rebase -m master >report &&
|
git rebase -m master >report &&
|
||||||
sed -n -e "/^Already applied: /p" \
|
sed -n -e "/^Already applied: /p" \
|
||||||
-e "/^Committed: /p" report >actual &&
|
-e "/^Committed: /p" report >actual &&
|
||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'rebase --stat' '
|
test_expect_success 'rebase --stat' '
|
||||||
|
Loading…
Reference in New Issue
Block a user