t6200: modernize with test_tick
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>
Stephen Boyd committed
Mar 24, 2010 at 00:15 UTC
6183a6adf140966d85521aa0360518743813ba37
1 file changed
+29
-35
t/t6200-fmt-merge-msg.sh
+29
-35
@@ -7,18 +7,10 @@ test_description='fmt-merge-msg test'
7
8
. ./test-lib.sh
9
10
-datestamp=1151939923
11
-setdate () {
12
- GIT_COMMITTER_DATE="$datestamp +0200"
13
- GIT_AUTHOR_DATE="$datestamp +0200"
14
- datestamp=`expr "$datestamp" + 1`
15
- export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
16
-}
17
-
10
test_expect_success setup '
11
echo one >one &&
12
git add one &&
21
- setdate &&
13
+ test_tick &&
14
git commit -m "Initial" &&
15
16
git clone . remote &&
@@ -26,46 +18,48 @@ test_expect_success setup '
18
echo uno >one &&
19
echo dos >two &&
20
git add two &&
29
- setdate &&
21
+ test_tick &&
22
git commit -a -m "Second" &&
23
24
git checkout -b left &&
25
34
- echo $datestamp >one &&
35
- setdate &&
26
+ echo "c1" >one &&
27
+ test_tick &&
28
git commit -a -m "Common #1" &&
29
38
- echo $datestamp >one &&
39
- setdate &&
30
+ echo "c2" >one &&
31
+ test_tick &&
32
git commit -a -m "Common #2" &&
33
34
git branch right &&
35
44
- echo $datestamp >two &&
45
- setdate &&
36
+ echo "l3" >two &&
37
+ test_tick &&
38
git commit -a -m "Left #3" &&
39
48
- echo $datestamp >two &&
49
- setdate &&
40
+ echo "l4" >two &&
41
+ test_tick &&
42
git commit -a -m "Left #4" &&
43
52
- echo $datestamp >two &&
53
- setdate &&
44
+ echo "l5" >two &&
45
+ test_tick &&
46
git commit -a -m "Left #5" &&
47
+ git tag tag-l5 &&
48
49
git checkout right &&
50
58
- echo $datestamp >three &&
51
+ echo "r3" >three &&
52
git add three &&
60
- setdate &&
53
+ test_tick &&
54
git commit -a -m "Right #3" &&
55
+ git tag tag-r3 &&
56
63
- echo $datestamp >three &&
64
- setdate &&
57
+ echo "r4" >three &&
58
+ test_tick &&
59
git commit -a -m "Right #4" &&
60
67
- echo $datestamp >three &&
68
- setdate &&
61
+ echo "r5" >three &&
62
+ test_tick &&
63
git commit -a -m "Right #5" &&
64
65
git show-branch
@@ -115,7 +109,7 @@ test_expect_success 'merge-msg test #3-1' '
109
git config merge.log true &&
110
111
git checkout master &&
118
- setdate &&
112
+ test_tick &&
113
git fetch . left &&
114
115
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -129,7 +123,7 @@ test_expect_success 'merge-msg test #3-2' '
123
git config merge.summary true &&
124
125
git checkout master &&
132
- setdate &&
126
+ test_tick &&
127
git fetch . left &&
128
129
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -161,7 +155,7 @@ test_expect_success 'merge-msg test #4-1' '
155
git config merge.log true &&
156
157
git checkout master &&
164
- setdate &&
158
+ test_tick &&
159
git fetch . left right &&
160
161
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -175,7 +169,7 @@ test_expect_success 'merge-msg test #4-2' '
169
git config merge.summary true &&
170
171
git checkout master &&
178
- setdate &&
172
+ test_tick &&
173
git fetch . left right &&
174
175
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -189,7 +183,7 @@ test_expect_success 'merge-msg test #5-1' '
183
git config merge.log yes &&
184
185
git checkout master &&
192
- setdate &&
186
+ test_tick &&
187
git fetch . left right &&
188
189
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -203,7 +197,7 @@ test_expect_success 'merge-msg test #5-2' '
197
git config merge.summary yes &&
198
199
git checkout master &&
206
- setdate &&
200
+ test_tick &&
201
git fetch . left right &&
202
203
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -217,7 +211,7 @@ test_expect_success 'merge-msg -F' '
211
git config merge.summary yes &&
212
213
git checkout master &&
220
- setdate &&
214
+ test_tick &&
215
git fetch . left right &&
216
217
git fmt-merge-msg -F .git/FETCH_HEAD >actual &&
@@ -231,7 +225,7 @@ test_expect_success 'merge-msg -F in subdirectory' '
225
git config merge.summary yes &&
226
227
git checkout master &&
234
- setdate &&
228
+ test_tick &&
229
git fetch . left right &&
230
mkdir sub &&
231
cp .git/FETCH_HEAD sub/FETCH_HEAD &&
@@ -251,7 +245,7 @@ test_expect_success 'merge-msg with nothing to merge' '
245
(
246
cd remote &&
247
git checkout -b unrelated &&
254
- setdate &&
248
+ test_tick &&
249
git fetch origin &&
250
git fmt-merge-msg <.git/FETCH_HEAD >../actual
251
) &&