Skip to content

Commit

Permalink
t6200: modernize with test_tick
Browse files Browse the repository at this point in the history
This test defines its own version of test_tick. Get rid of it.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Stephen Boyd authored and Junio C Hamano committed Mar 25, 2010
1 parent 419fe5b commit 6183a6a
Showing 1 changed file with 29 additions and 35 deletions.
64 changes: 29 additions & 35 deletions t/t6200-fmt-merge-msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,59 @@ test_description='fmt-merge-msg test'

. ./test-lib.sh

datestamp=1151939923
setdate () {
GIT_COMMITTER_DATE="$datestamp +0200"
GIT_AUTHOR_DATE="$datestamp +0200"
datestamp=`expr "$datestamp" + 1`
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
}

test_expect_success setup '
echo one >one &&
git add one &&
setdate &&
test_tick &&
git commit -m "Initial" &&
git clone . remote &&
echo uno >one &&
echo dos >two &&
git add two &&
setdate &&
test_tick &&
git commit -a -m "Second" &&
git checkout -b left &&
echo $datestamp >one &&
setdate &&
echo "c1" >one &&
test_tick &&
git commit -a -m "Common #1" &&
echo $datestamp >one &&
setdate &&
echo "c2" >one &&
test_tick &&
git commit -a -m "Common #2" &&
git branch right &&
echo $datestamp >two &&
setdate &&
echo "l3" >two &&
test_tick &&
git commit -a -m "Left #3" &&
echo $datestamp >two &&
setdate &&
echo "l4" >two &&
test_tick &&
git commit -a -m "Left #4" &&
echo $datestamp >two &&
setdate &&
echo "l5" >two &&
test_tick &&
git commit -a -m "Left #5" &&
git tag tag-l5 &&
git checkout right &&
echo $datestamp >three &&
echo "r3" >three &&
git add three &&
setdate &&
test_tick &&
git commit -a -m "Right #3" &&
git tag tag-r3 &&
echo $datestamp >three &&
setdate &&
echo "r4" >three &&
test_tick &&
git commit -a -m "Right #4" &&
echo $datestamp >three &&
setdate &&
echo "r5" >three &&
test_tick &&
git commit -a -m "Right #5" &&
git show-branch
Expand Down Expand Up @@ -115,7 +109,7 @@ test_expect_success 'merge-msg test #3-1' '
git config merge.log true &&
git checkout master &&
setdate &&
test_tick &&
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
Expand All @@ -129,7 +123,7 @@ test_expect_success 'merge-msg test #3-2' '
git config merge.summary true &&
git checkout master &&
setdate &&
test_tick &&
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
Expand Down Expand Up @@ -161,7 +155,7 @@ test_expect_success 'merge-msg test #4-1' '
git config merge.log true &&
git checkout master &&
setdate &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
Expand All @@ -175,7 +169,7 @@ test_expect_success 'merge-msg test #4-2' '
git config merge.summary true &&
git checkout master &&
setdate &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
Expand All @@ -189,7 +183,7 @@ test_expect_success 'merge-msg test #5-1' '
git config merge.log yes &&
git checkout master &&
setdate &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
Expand All @@ -203,7 +197,7 @@ test_expect_success 'merge-msg test #5-2' '
git config merge.summary yes &&
git checkout master &&
setdate &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
Expand All @@ -217,7 +211,7 @@ test_expect_success 'merge-msg -F' '
git config merge.summary yes &&
git checkout master &&
setdate &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg -F .git/FETCH_HEAD >actual &&
Expand All @@ -231,7 +225,7 @@ test_expect_success 'merge-msg -F in subdirectory' '
git config merge.summary yes &&
git checkout master &&
setdate &&
test_tick &&
git fetch . left right &&
mkdir sub &&
cp .git/FETCH_HEAD sub/FETCH_HEAD &&
Expand All @@ -251,7 +245,7 @@ test_expect_success 'merge-msg with nothing to merge' '
(
cd remote &&
git checkout -b unrelated &&
setdate &&
test_tick &&
git fetch origin &&
git fmt-merge-msg <.git/FETCH_HEAD >../actual
) &&
Expand Down

0 comments on commit 6183a6a

Please sign in to comment.