Fossil SCM

Fix up all of the test scripts so that the test results match the latest fossil output. Ticket [4f43f7ff92ae02ae3]

drh 2010-12-22 01:31 trunk
Commit 1092a1df55920be6e80c3ff62a7756f95ea8e56b
+19 -19
--- test/merge1.test
+++ test/merge1.test
@@ -71,26 +71,26 @@
7171
333 - This is a test of the merging algohm - 3333
7272
444 - If all goes well, we will be pleased - 4444
7373
555 - we think it well and other stuff too - 5555
7474
}
7575
write_file_indented t23 {
76
- <<<<<<< BEGIN MERGE CONFLICT
76
+ <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
7777
111 - This is line ONE of the demo program - 1111
78
- ============================
78
+ ======= original content above; conflict below =============
7979
111 - This is line one OF the demo program - 1111
80
- >>>>>>> END MERGE CONFLICT
80
+ >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
8181
222 - The second line program line in code - 2222
8282
333 - This is a test of the merging algohm - 3333
8383
444 - If all goes well, we will be pleased - 4444
8484
555 - we think it well and other stuff too - 5555
8585
}
8686
write_file_indented t32 {
87
- <<<<<<< BEGIN MERGE CONFLICT
87
+ <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
8888
111 - This is line one OF the demo program - 1111
89
- ============================
89
+ ======= original content above; conflict below =============
9090
111 - This is line ONE of the demo program - 1111
91
- >>>>>>> END MERGE CONFLICT
91
+ >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
9292
222 - The second line program line in code - 2222
9393
333 - This is a test of the merging algohm - 3333
9494
444 - If all goes well, we will be pleased - 4444
9595
555 - we think it well and other stuff too - 5555
9696
}
@@ -152,26 +152,26 @@
152152
333 - This is a test of the merging algohm - 3333
153153
444 - If all goes well, we will be pleased - 4444
154154
555 - we think it well and other stuff too - 5555
155155
}
156156
write_file_indented t32 {
157
- <<<<<<< BEGIN MERGE CONFLICT
158
- ============================
157
+ <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
158
+ ======= original content above; conflict below =============
159159
000 - Zero lines added to the beginning of - 0000
160160
111 - This is line one of the demo program - 1111
161
- >>>>>>> END MERGE CONFLICT
161
+ >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
162162
222 - The second line program line in code - 2222
163163
333 - This is a test of the merging algohm - 3333
164164
444 - If all goes well, we will be pleased - 4444
165165
555 - we think it well and other stuff too - 5555
166166
}
167167
write_file_indented t23 {
168
- <<<<<<< BEGIN MERGE CONFLICT
168
+ <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
169169
000 - Zero lines added to the beginning of - 0000
170170
111 - This is line one of the demo program - 1111
171
- ============================
172
- >>>>>>> END MERGE CONFLICT
171
+ ======= original content above; conflict below =============
172
+ >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
173173
222 - The second line program line in code - 2222
174174
333 - This is a test of the merging algohm - 3333
175175
444 - If all goes well, we will be pleased - 4444
176176
555 - we think it well and other stuff too - 5555
177177
}
@@ -287,29 +287,29 @@
287287
STUV
288288
XYZ.
289289
}
290290
write_file_indented t23 {
291291
abcd
292
- <<<<<<< BEGIN MERGE CONFLICT
292
+ <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
293293
efgh 2
294294
ijkl 2
295295
mnop 2
296296
qrst
297297
uvwx
298298
yzAB 2
299299
CDEF 2
300300
GHIJ 2
301
- ============================
301
+ ======= original content above; conflict below =============
302302
efgh
303303
ijkl
304304
mnop 3
305305
qrst 3
306306
uvwx 3
307307
yzAB 3
308308
CDEF
309309
GHIJ
310
- >>>>>>> END MERGE CONFLICT
310
+ >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
311311
KLMN
312312
OPQR
313313
STUV
314314
XYZ.
315315
}
@@ -348,27 +348,27 @@
348348
}
349349
write_file_indented t23 {
350350
abcd
351351
efgh 2
352352
ijkl 2
353
- <<<<<<< BEGIN MERGE CONFLICT
354
- mnop
353
+ <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
354
+ mnop
355355
qrst
356356
uvwx
357357
yzAB 2
358358
CDEF 2
359359
GHIJ 2
360
- ============================
360
+ ======= original content above; conflict below =============
361361
mnop 3
362362
qrst 3
363363
uvwx 3
364364
yzAB 3
365365
CDEF
366366
GHIJ
367
- >>>>>>> END MERGE CONFLICT
367
+ >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
368368
KLMN
369369
OPQR
370370
STUV
371371
XYZ.
372372
}
373373
fossil test-3 t1 t2 t3 a23
374374
test merge1-7.2 {[same_file t23 a23]}
375375
--- test/merge1.test
+++ test/merge1.test
@@ -71,26 +71,26 @@
71 333 - This is a test of the merging algohm - 3333
72 444 - If all goes well, we will be pleased - 4444
73 555 - we think it well and other stuff too - 5555
74 }
75 write_file_indented t23 {
76 <<<<<<< BEGIN MERGE CONFLICT
77 111 - This is line ONE of the demo program - 1111
78 ============================
79 111 - This is line one OF the demo program - 1111
80 >>>>>>> END MERGE CONFLICT
81 222 - The second line program line in code - 2222
82 333 - This is a test of the merging algohm - 3333
83 444 - If all goes well, we will be pleased - 4444
84 555 - we think it well and other stuff too - 5555
85 }
86 write_file_indented t32 {
87 <<<<<<< BEGIN MERGE CONFLICT
88 111 - This is line one OF the demo program - 1111
89 ============================
90 111 - This is line ONE of the demo program - 1111
91 >>>>>>> END MERGE CONFLICT
92 222 - The second line program line in code - 2222
93 333 - This is a test of the merging algohm - 3333
94 444 - If all goes well, we will be pleased - 4444
95 555 - we think it well and other stuff too - 5555
96 }
@@ -152,26 +152,26 @@
152 333 - This is a test of the merging algohm - 3333
153 444 - If all goes well, we will be pleased - 4444
154 555 - we think it well and other stuff too - 5555
155 }
156 write_file_indented t32 {
157 <<<<<<< BEGIN MERGE CONFLICT
158 ============================
159 000 - Zero lines added to the beginning of - 0000
160 111 - This is line one of the demo program - 1111
161 >>>>>>> END MERGE CONFLICT
162 222 - The second line program line in code - 2222
163 333 - This is a test of the merging algohm - 3333
164 444 - If all goes well, we will be pleased - 4444
165 555 - we think it well and other stuff too - 5555
166 }
167 write_file_indented t23 {
168 <<<<<<< BEGIN MERGE CONFLICT
169 000 - Zero lines added to the beginning of - 0000
170 111 - This is line one of the demo program - 1111
171 ============================
172 >>>>>>> END MERGE CONFLICT
173 222 - The second line program line in code - 2222
174 333 - This is a test of the merging algohm - 3333
175 444 - If all goes well, we will be pleased - 4444
176 555 - we think it well and other stuff too - 5555
177 }
@@ -287,29 +287,29 @@
287 STUV
288 XYZ.
289 }
290 write_file_indented t23 {
291 abcd
292 <<<<<<< BEGIN MERGE CONFLICT
293 efgh 2
294 ijkl 2
295 mnop 2
296 qrst
297 uvwx
298 yzAB 2
299 CDEF 2
300 GHIJ 2
301 ============================
302 efgh
303 ijkl
304 mnop 3
305 qrst 3
306 uvwx 3
307 yzAB 3
308 CDEF
309 GHIJ
310 >>>>>>> END MERGE CONFLICT
311 KLMN
312 OPQR
313 STUV
314 XYZ.
315 }
@@ -348,27 +348,27 @@
348 }
349 write_file_indented t23 {
350 abcd
351 efgh 2
352 ijkl 2
353 <<<<<<< BEGIN MERGE CONFLICT
354 mnop
355 qrst
356 uvwx
357 yzAB 2
358 CDEF 2
359 GHIJ 2
360 ============================
361 mnop 3
362 qrst 3
363 uvwx 3
364 yzAB 3
365 CDEF
366 GHIJ
367 >>>>>>> END MERGE CONFLICT
368 KLMN
369 OPQR
370 STUV
371 XYZ.
372 }
373 fossil test-3 t1 t2 t3 a23
374 test merge1-7.2 {[same_file t23 a23]}
375
--- test/merge1.test
+++ test/merge1.test
@@ -71,26 +71,26 @@
71 333 - This is a test of the merging algohm - 3333
72 444 - If all goes well, we will be pleased - 4444
73 555 - we think it well and other stuff too - 5555
74 }
75 write_file_indented t23 {
76 <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
77 111 - This is line ONE of the demo program - 1111
78 ======= original content above; conflict below =============
79 111 - This is line one OF the demo program - 1111
80 >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
81 222 - The second line program line in code - 2222
82 333 - This is a test of the merging algohm - 3333
83 444 - If all goes well, we will be pleased - 4444
84 555 - we think it well and other stuff too - 5555
85 }
86 write_file_indented t32 {
87 <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
88 111 - This is line one OF the demo program - 1111
89 ======= original content above; conflict below =============
90 111 - This is line ONE of the demo program - 1111
91 >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
92 222 - The second line program line in code - 2222
93 333 - This is a test of the merging algohm - 3333
94 444 - If all goes well, we will be pleased - 4444
95 555 - we think it well and other stuff too - 5555
96 }
@@ -152,26 +152,26 @@
152 333 - This is a test of the merging algohm - 3333
153 444 - If all goes well, we will be pleased - 4444
154 555 - we think it well and other stuff too - 5555
155 }
156 write_file_indented t32 {
157 <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
158 ======= original content above; conflict below =============
159 000 - Zero lines added to the beginning of - 0000
160 111 - This is line one of the demo program - 1111
161 >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
162 222 - The second line program line in code - 2222
163 333 - This is a test of the merging algohm - 3333
164 444 - If all goes well, we will be pleased - 4444
165 555 - we think it well and other stuff too - 5555
166 }
167 write_file_indented t23 {
168 <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
169 000 - Zero lines added to the beginning of - 0000
170 111 - This is line one of the demo program - 1111
171 ======= original content above; conflict below =============
172 >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
173 222 - The second line program line in code - 2222
174 333 - This is a test of the merging algohm - 3333
175 444 - If all goes well, we will be pleased - 4444
176 555 - we think it well and other stuff too - 5555
177 }
@@ -287,29 +287,29 @@
287 STUV
288 XYZ.
289 }
290 write_file_indented t23 {
291 abcd
292 <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
293 efgh 2
294 ijkl 2
295 mnop 2
296 qrst
297 uvwx
298 yzAB 2
299 CDEF 2
300 GHIJ 2
301 ======= original content above; conflict below =============
302 efgh
303 ijkl
304 mnop 3
305 qrst 3
306 uvwx 3
307 yzAB 3
308 CDEF
309 GHIJ
310 >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
311 KLMN
312 OPQR
313 STUV
314 XYZ.
315 }
@@ -348,27 +348,27 @@
348 }
349 write_file_indented t23 {
350 abcd
351 efgh 2
352 ijkl 2
353 <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<
354 mnop
355 qrst
356 uvwx
357 yzAB 2
358 CDEF 2
359 GHIJ 2
360 ======= original content above; conflict below =============
361 mnop 3
362 qrst 3
363 uvwx 3
364 yzAB 3
365 CDEF
366 GHIJ
367 >>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>
368 KLMN
369 OPQR
370 STUV
371 XYZ.
372 }
373 fossil test-3 t1 t2 t3 a23
374 test merge1-7.2 {[same_file t23 a23]}
375
--- test/merge3.test
+++ test/merge3.test
@@ -22,13 +22,13 @@
2222
write_file t1 [join [string trim $basis] \n]\n
2323
write_file t2 [join [string trim $v1] \n]\n
2424
write_file t3 [join [string trim $v2] \n]\n
2525
fossil test-3-way-merge t1 t2 t3 t4
2626
set x [read_file t4]
27
- regsub -all {<<<<<<< BEGIN MERGE CONFLICT} $x {>} x
28
- regsub -all {============================} $x {=} x
29
- regsub -all {>>>>>>> END MERGE CONFLICT} $x {<} x
27
+ regsub -all {<<<<<<< BEGIN MERGE CONFLICT:.*<} $x {>} x
28
+ regsub -all {======= original content.*======} $x {=} x
29
+ regsub -all {>>>>>>> END MERGE CONFLICT:.*>>>} $x {<} x
3030
set x [split [string trim $x] \n]
3131
set result [string trim $result]
3232
if {$x!=$result} {
3333
protOut " Expected \[$result\]"
3434
protOut " Got \[$x\]"
3535
--- test/merge3.test
+++ test/merge3.test
@@ -22,13 +22,13 @@
22 write_file t1 [join [string trim $basis] \n]\n
23 write_file t2 [join [string trim $v1] \n]\n
24 write_file t3 [join [string trim $v2] \n]\n
25 fossil test-3-way-merge t1 t2 t3 t4
26 set x [read_file t4]
27 regsub -all {<<<<<<< BEGIN MERGE CONFLICT} $x {>} x
28 regsub -all {============================} $x {=} x
29 regsub -all {>>>>>>> END MERGE CONFLICT} $x {<} x
30 set x [split [string trim $x] \n]
31 set result [string trim $result]
32 if {$x!=$result} {
33 protOut " Expected \[$result\]"
34 protOut " Got \[$x\]"
35
--- test/merge3.test
+++ test/merge3.test
@@ -22,13 +22,13 @@
22 write_file t1 [join [string trim $basis] \n]\n
23 write_file t2 [join [string trim $v1] \n]\n
24 write_file t3 [join [string trim $v2] \n]\n
25 fossil test-3-way-merge t1 t2 t3 t4
26 set x [read_file t4]
27 regsub -all {<<<<<<< BEGIN MERGE CONFLICT:.*<} $x {>} x
28 regsub -all {======= original content.*======} $x {=} x
29 regsub -all {>>>>>>> END MERGE CONFLICT:.*>>>} $x {<} x
30 set x [split [string trim $x] \n]
31 set result [string trim $result]
32 if {$x!=$result} {
33 protOut " Expected \[$result\]"
34 protOut " Got \[$x\]"
35
--- test/merge4.test
+++ test/merge4.test
@@ -23,18 +23,18 @@
2323
write_file t2 [join [string trim $v1] \n]\n
2424
write_file t3 [join [string trim $v2] \n]\n
2525
fossil test-3-way-merge t1 t2 t3 t4
2626
fossil test-3-way-merge t1 t3 t2 t5
2727
set x [read_file t4]
28
- regsub -all {<<<<<<< BEGIN MERGE CONFLICT} $x {>} x
29
- regsub -all {============================} $x {=} x
30
- regsub -all {>>>>>>> END MERGE CONFLICT} $x {<} x
28
+ regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $x {>} x
29
+ regsub -all {=======.*=======} $x {=} x
30
+ regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x
3131
set x [split [string trim $x] \n]
3232
set y [read_file t5]
33
- regsub -all {<<<<<<< BEGIN MERGE CONFLICT} $y {>} y
34
- regsub -all {============================} $y {=} y
35
- regsub -all {>>>>>>> END MERGE CONFLICT} $y {<} y
33
+ regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $y {>} y
34
+ regsub -all {=======.*=======} $y {=} y
35
+ regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $y {<} y
3636
set y [split [string trim $y] \n]
3737
set result1 [string trim $result1]
3838
if {$x!=$result1} {
3939
protOut " Expected \[$result1\]"
4040
protOut " Got \[$x\]"
4141
--- test/merge4.test
+++ test/merge4.test
@@ -23,18 +23,18 @@
23 write_file t2 [join [string trim $v1] \n]\n
24 write_file t3 [join [string trim $v2] \n]\n
25 fossil test-3-way-merge t1 t2 t3 t4
26 fossil test-3-way-merge t1 t3 t2 t5
27 set x [read_file t4]
28 regsub -all {<<<<<<< BEGIN MERGE CONFLICT} $x {>} x
29 regsub -all {============================} $x {=} x
30 regsub -all {>>>>>>> END MERGE CONFLICT} $x {<} x
31 set x [split [string trim $x] \n]
32 set y [read_file t5]
33 regsub -all {<<<<<<< BEGIN MERGE CONFLICT} $y {>} y
34 regsub -all {============================} $y {=} y
35 regsub -all {>>>>>>> END MERGE CONFLICT} $y {<} y
36 set y [split [string trim $y] \n]
37 set result1 [string trim $result1]
38 if {$x!=$result1} {
39 protOut " Expected \[$result1\]"
40 protOut " Got \[$x\]"
41
--- test/merge4.test
+++ test/merge4.test
@@ -23,18 +23,18 @@
23 write_file t2 [join [string trim $v1] \n]\n
24 write_file t3 [join [string trim $v2] \n]\n
25 fossil test-3-way-merge t1 t2 t3 t4
26 fossil test-3-way-merge t1 t3 t2 t5
27 set x [read_file t4]
28 regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $x {>} x
29 regsub -all {=======.*=======} $x {=} x
30 regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x
31 set x [split [string trim $x] \n]
32 set y [read_file t5]
33 regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $y {>} y
34 regsub -all {=======.*=======} $y {=} y
35 regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $y {<} y
36 set y [split [string trim $y] \n]
37 set result1 [string trim $result1]
38 if {$x!=$result1} {
39 protOut " Expected \[$result1\]"
40 protOut " Got \[$x\]"
41
--- test/merge5.test
+++ test/merge5.test
@@ -35,10 +35,17 @@
3535
test merge5-$testid 0
3636
} else {
3737
test merge5-$testid 1
3838
}
3939
}
40
+
41
+catch {exec $::fossilexe info} res
42
+puts res=$res
43
+if {![regexp {not within an open checkout} $res]} {
44
+ puts stderr "Cannot run this test within an open checkout"
45
+ return
46
+}
4047
4148
# Construct a test repository
4249
#
4350
exec sqlite3 m5.fossil <$testdir/${testfile}_repo.sql
4451
fossil rebuild m5.fossil
4552
--- test/merge5.test
+++ test/merge5.test
@@ -35,10 +35,17 @@
35 test merge5-$testid 0
36 } else {
37 test merge5-$testid 1
38 }
39 }
 
 
 
 
 
 
 
40
41 # Construct a test repository
42 #
43 exec sqlite3 m5.fossil <$testdir/${testfile}_repo.sql
44 fossil rebuild m5.fossil
45
--- test/merge5.test
+++ test/merge5.test
@@ -35,10 +35,17 @@
35 test merge5-$testid 0
36 } else {
37 test merge5-$testid 1
38 }
39 }
40
41 catch {exec $::fossilexe info} res
42 puts res=$res
43 if {![regexp {not within an open checkout} $res]} {
44 puts stderr "Cannot run this test within an open checkout"
45 return
46 }
47
48 # Construct a test repository
49 #
50 exec sqlite3 m5.fossil <$testdir/${testfile}_repo.sql
51 fossil rebuild m5.fossil
52

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button