Fossil SCM

Update tests to refect recent code changes

ashepilko 2020-07-31 02:21 trunk
Commit 981049f79843e214a159a6be436f2ce25e591055e6c225e92e88e3d9b443213b
--- test/merge1.test
+++ test/merge1.test
@@ -75,11 +75,11 @@
7575
555 - we think it well and other stuff too - 5555
7676
}
7777
write_file_indented t23 {
7878
<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
7979
111 - This is line ONE of the demo program - 1111
80
- ======= COMMON ANCESTOR content follows ============================
80
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
8181
111 - This is line one of the demo program - 1111
8282
======= MERGED IN content follows ==================================
8383
111 - This is line one OF the demo program - 1111
8484
>>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
8585
222 - The second line program line in code - 2222
@@ -88,11 +88,11 @@
8888
555 - we think it well and other stuff too - 5555
8989
}
9090
write_file_indented t32 {
9191
<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
9292
111 - This is line one OF the demo program - 1111
93
- ======= COMMON ANCESTOR content follows ============================
93
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
9494
111 - This is line one of the demo program - 1111
9595
======= MERGED IN content follows ==================================
9696
111 - This is line ONE of the demo program - 1111
9797
>>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
9898
222 - The second line program line in code - 2222
@@ -159,11 +159,11 @@
159159
444 - If all goes well, we will be pleased - 4444
160160
555 - we think it well and other stuff too - 5555
161161
}
162162
write_file_indented t32 {
163163
<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
164
- ======= COMMON ANCESTOR content follows ============================
164
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
165165
111 - This is line one of the demo program - 1111
166166
======= MERGED IN content follows ==================================
167167
000 - Zero lines added to the beginning of - 0000
168168
111 - This is line one of the demo program - 1111
169169
>>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -174,11 +174,11 @@
174174
}
175175
write_file_indented t23 {
176176
<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
177177
000 - Zero lines added to the beginning of - 0000
178178
111 - This is line one of the demo program - 1111
179
- ======= COMMON ANCESTOR content follows ============================
179
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
180180
111 - This is line one of the demo program - 1111
181181
======= MERGED IN content follows ==================================
182182
>>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
183183
222 - The second line program line in code - 2222
184184
333 - This is a test of the merging algohm - 3333
@@ -306,11 +306,11 @@
306306
qrst
307307
uvwx
308308
yzAB 2
309309
CDEF 2
310310
GHIJ 2
311
- ======= COMMON ANCESTOR content follows ============================
311
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
312312
efgh
313313
ijkl
314314
mnop
315315
qrst
316316
uvwx
@@ -374,11 +374,11 @@
374374
qrst
375375
uvwx
376376
yzAB 2
377377
CDEF 2
378378
GHIJ 2
379
- ======= COMMON ANCESTOR content follows ============================
379
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
380380
efgh
381381
ijkl
382382
mnop
383383
qrst
384384
uvwx
385385
--- test/merge1.test
+++ test/merge1.test
@@ -75,11 +75,11 @@
75 555 - we think it well and other stuff too - 5555
76 }
77 write_file_indented t23 {
78 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
79 111 - This is line ONE of the demo program - 1111
80 ======= COMMON ANCESTOR content follows ============================
81 111 - This is line one of the demo program - 1111
82 ======= MERGED IN content follows ==================================
83 111 - This is line one OF the demo program - 1111
84 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
85 222 - The second line program line in code - 2222
@@ -88,11 +88,11 @@
88 555 - we think it well and other stuff too - 5555
89 }
90 write_file_indented t32 {
91 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
92 111 - This is line one OF the demo program - 1111
93 ======= COMMON ANCESTOR content follows ============================
94 111 - This is line one of the demo program - 1111
95 ======= MERGED IN content follows ==================================
96 111 - This is line ONE of the demo program - 1111
97 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
98 222 - The second line program line in code - 2222
@@ -159,11 +159,11 @@
159 444 - If all goes well, we will be pleased - 4444
160 555 - we think it well and other stuff too - 5555
161 }
162 write_file_indented t32 {
163 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
164 ======= COMMON ANCESTOR content follows ============================
165 111 - This is line one of the demo program - 1111
166 ======= MERGED IN content follows ==================================
167 000 - Zero lines added to the beginning of - 0000
168 111 - This is line one of the demo program - 1111
169 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -174,11 +174,11 @@
174 }
175 write_file_indented t23 {
176 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
177 000 - Zero lines added to the beginning of - 0000
178 111 - This is line one of the demo program - 1111
179 ======= COMMON ANCESTOR content follows ============================
180 111 - This is line one of the demo program - 1111
181 ======= MERGED IN content follows ==================================
182 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
183 222 - The second line program line in code - 2222
184 333 - This is a test of the merging algohm - 3333
@@ -306,11 +306,11 @@
306 qrst
307 uvwx
308 yzAB 2
309 CDEF 2
310 GHIJ 2
311 ======= COMMON ANCESTOR content follows ============================
312 efgh
313 ijkl
314 mnop
315 qrst
316 uvwx
@@ -374,11 +374,11 @@
374 qrst
375 uvwx
376 yzAB 2
377 CDEF 2
378 GHIJ 2
379 ======= COMMON ANCESTOR content follows ============================
380 efgh
381 ijkl
382 mnop
383 qrst
384 uvwx
385
--- test/merge1.test
+++ test/merge1.test
@@ -75,11 +75,11 @@
75 555 - we think it well and other stuff too - 5555
76 }
77 write_file_indented t23 {
78 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
79 111 - This is line ONE of the demo program - 1111
80 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
81 111 - This is line one of the demo program - 1111
82 ======= MERGED IN content follows ==================================
83 111 - This is line one OF the demo program - 1111
84 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
85 222 - The second line program line in code - 2222
@@ -88,11 +88,11 @@
88 555 - we think it well and other stuff too - 5555
89 }
90 write_file_indented t32 {
91 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
92 111 - This is line one OF the demo program - 1111
93 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
94 111 - This is line one of the demo program - 1111
95 ======= MERGED IN content follows ==================================
96 111 - This is line ONE of the demo program - 1111
97 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
98 222 - The second line program line in code - 2222
@@ -159,11 +159,11 @@
159 444 - If all goes well, we will be pleased - 4444
160 555 - we think it well and other stuff too - 5555
161 }
162 write_file_indented t32 {
163 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
164 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
165 111 - This is line one of the demo program - 1111
166 ======= MERGED IN content follows ==================================
167 000 - Zero lines added to the beginning of - 0000
168 111 - This is line one of the demo program - 1111
169 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -174,11 +174,11 @@
174 }
175 write_file_indented t23 {
176 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
177 000 - Zero lines added to the beginning of - 0000
178 111 - This is line one of the demo program - 1111
179 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
180 111 - This is line one of the demo program - 1111
181 ======= MERGED IN content follows ==================================
182 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
183 222 - The second line program line in code - 2222
184 333 - This is a test of the merging algohm - 3333
@@ -306,11 +306,11 @@
306 qrst
307 uvwx
308 yzAB 2
309 CDEF 2
310 GHIJ 2
311 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
312 efgh
313 ijkl
314 mnop
315 qrst
316 uvwx
@@ -374,11 +374,11 @@
374 qrst
375 uvwx
376 yzAB 2
377 CDEF 2
378 GHIJ 2
379 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
380 efgh
381 ijkl
382 mnop
383 qrst
384 uvwx
385
--- test/merge3.test
+++ test/merge3.test
@@ -26,11 +26,11 @@
2626
write_file t3 [join [string trim $v2] \n]\n
2727
fossil 3-way-merge t1 t2 t3 t4
2828
set x [read_file t4]
2929
regsub -all {<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <+} $x \
3030
{MINE:} x
31
- regsub -all {======= COMMON ANCESTOR content follows =+} $x {COM:} x
31
+ regsub -all {\|\|\|\|\|\|\| COMMON ANCESTOR content follows \|+} $x {COM:} x
3232
regsub -all {======= MERGED IN content follows =+} $x {YOURS:} x
3333
regsub -all {>>>>>>> END MERGE CONFLICT >+} $x {END} x
3434
set x [split [string trim $x] \n]
3535
set result [string trim $result]
3636
if {$x!=$result} {
3737
--- test/merge3.test
+++ test/merge3.test
@@ -26,11 +26,11 @@
26 write_file t3 [join [string trim $v2] \n]\n
27 fossil 3-way-merge t1 t2 t3 t4
28 set x [read_file t4]
29 regsub -all {<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <+} $x \
30 {MINE:} x
31 regsub -all {======= COMMON ANCESTOR content follows =+} $x {COM:} x
32 regsub -all {======= MERGED IN content follows =+} $x {YOURS:} x
33 regsub -all {>>>>>>> END MERGE CONFLICT >+} $x {END} x
34 set x [split [string trim $x] \n]
35 set result [string trim $result]
36 if {$x!=$result} {
37
--- test/merge3.test
+++ test/merge3.test
@@ -26,11 +26,11 @@
26 write_file t3 [join [string trim $v2] \n]\n
27 fossil 3-way-merge t1 t2 t3 t4
28 set x [read_file t4]
29 regsub -all {<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <+} $x \
30 {MINE:} x
31 regsub -all {\|\|\|\|\|\|\| COMMON ANCESTOR content follows \|+} $x {COM:} x
32 regsub -all {======= MERGED IN content follows =+} $x {YOURS:} x
33 regsub -all {>>>>>>> END MERGE CONFLICT >+} $x {END} x
34 set x [split [string trim $x] \n]
35 set result [string trim $result]
36 if {$x!=$result} {
37
--- test/merge4.test
+++ test/merge4.test
@@ -26,31 +26,31 @@
2626
write_file t3 [join [string trim $v2] \n]\n
2727
fossil 3-way-merge t1 t2 t3 t4
2828
fossil 3-way-merge t1 t3 t2 t5
2929
set x [read_file t4]
3030
regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $x {>} x
31
- regsub -all {=======.*=======} $x {=} x
31
+ regsub -all {\|\|\|\|\|\|\|.*=======} $x {=} x
3232
regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x
3333
set x [split [string trim $x] \n]
3434
set y [read_file t5]
3535
regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $y {>} y
36
- regsub -all {=======.*=======} $y {=} y
36
+ regsub -all {\|\|\|\|\|\|\|.*=======} $y {=} y
3737
regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $y {<} y
3838
set y [split [string trim $y] \n]
3939
set result1 [string trim $result1]
4040
if {$x!=$result1} {
4141
protOut " Expected \[$result1\]"
4242
protOut " Got \[$x\]"
43
- test merge3-$testid 0
43
+ test merge4-$testid 0
4444
} else {
4545
set result2 [string trim $result2]
4646
if {$y!=$result2} {
4747
protOut " Expected \[$result2\]"
4848
protOut " Got \[$y\]"
49
- test merge3-$testid 0
49
+ test merge4-$testid 0
5050
} else {
51
- test merge3-$testid 1
51
+ test merge4-$testid 1
5252
}
5353
}
5454
}
5555
5656
merge-test 1000 {
5757
--- test/merge4.test
+++ test/merge4.test
@@ -26,31 +26,31 @@
26 write_file t3 [join [string trim $v2] \n]\n
27 fossil 3-way-merge t1 t2 t3 t4
28 fossil 3-way-merge t1 t3 t2 t5
29 set x [read_file t4]
30 regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $x {>} x
31 regsub -all {=======.*=======} $x {=} x
32 regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x
33 set x [split [string trim $x] \n]
34 set y [read_file t5]
35 regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $y {>} y
36 regsub -all {=======.*=======} $y {=} y
37 regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $y {<} y
38 set y [split [string trim $y] \n]
39 set result1 [string trim $result1]
40 if {$x!=$result1} {
41 protOut " Expected \[$result1\]"
42 protOut " Got \[$x\]"
43 test merge3-$testid 0
44 } else {
45 set result2 [string trim $result2]
46 if {$y!=$result2} {
47 protOut " Expected \[$result2\]"
48 protOut " Got \[$y\]"
49 test merge3-$testid 0
50 } else {
51 test merge3-$testid 1
52 }
53 }
54 }
55
56 merge-test 1000 {
57
--- test/merge4.test
+++ test/merge4.test
@@ -26,31 +26,31 @@
26 write_file t3 [join [string trim $v2] \n]\n
27 fossil 3-way-merge t1 t2 t3 t4
28 fossil 3-way-merge t1 t3 t2 t5
29 set x [read_file t4]
30 regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $x {>} x
31 regsub -all {\|\|\|\|\|\|\|.*=======} $x {=} x
32 regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x
33 set x [split [string trim $x] \n]
34 set y [read_file t5]
35 regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $y {>} y
36 regsub -all {\|\|\|\|\|\|\|.*=======} $y {=} y
37 regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $y {<} y
38 set y [split [string trim $y] \n]
39 set result1 [string trim $result1]
40 if {$x!=$result1} {
41 protOut " Expected \[$result1\]"
42 protOut " Got \[$x\]"
43 test merge4-$testid 0
44 } else {
45 set result2 [string trim $result2]
46 if {$y!=$result2} {
47 protOut " Expected \[$result2\]"
48 protOut " Got \[$y\]"
49 test merge4-$testid 0
50 } else {
51 test merge4-$testid 1
52 }
53 }
54 }
55
56 merge-test 1000 {
57
--- test/tester.tcl
+++ test/tester.tcl
@@ -334,10 +334,11 @@
334334
proxy \
335335
redirect-to-https \
336336
relative-paths \
337337
repo-cksum \
338338
repolist-skin \
339
+ safe-html \
339340
self-register \
340341
ssh-command \
341342
ssl-ca-location \
342343
ssl-identity \
343344
tclsh \
344345
--- test/tester.tcl
+++ test/tester.tcl
@@ -334,10 +334,11 @@
334 proxy \
335 redirect-to-https \
336 relative-paths \
337 repo-cksum \
338 repolist-skin \
 
339 self-register \
340 ssh-command \
341 ssl-ca-location \
342 ssl-identity \
343 tclsh \
344
--- test/tester.tcl
+++ test/tester.tcl
@@ -334,10 +334,11 @@
334 proxy \
335 redirect-to-https \
336 relative-paths \
337 repo-cksum \
338 repolist-skin \
339 safe-html \
340 self-register \
341 ssh-command \
342 ssl-ca-location \
343 ssl-identity \
344 tclsh \
345
--- test/wiki.test
+++ test/wiki.test
@@ -17,10 +17,16 @@
1717
#
1818
# Test wiki and attachment command Support
1919
#
2020
2121
test_setup
22
+
23
+# Disable backoffice for this test, otherwise its process lingers for some
24
+# time after the test has completed.
25
+# Perhaps, this should be done in test_setup and enabled explicitly only
26
+# when needed.
27
+fossil set backoffice-disable 1
2228
2329
# Return true if two files are similar (i.e. not only compress trailing spaces
2430
# from a line, but remove any final LF from the file as well)
2531
proc similar_file {a b} {
2632
set x ""
2733
--- test/wiki.test
+++ test/wiki.test
@@ -17,10 +17,16 @@
17 #
18 # Test wiki and attachment command Support
19 #
20
21 test_setup
 
 
 
 
 
 
22
23 # Return true if two files are similar (i.e. not only compress trailing spaces
24 # from a line, but remove any final LF from the file as well)
25 proc similar_file {a b} {
26 set x ""
27
--- test/wiki.test
+++ test/wiki.test
@@ -17,10 +17,16 @@
17 #
18 # Test wiki and attachment command Support
19 #
20
21 test_setup
22
23 # Disable backoffice for this test, otherwise its process lingers for some
24 # time after the test has completed.
25 # Perhaps, this should be done in test_setup and enabled explicitly only
26 # when needed.
27 fossil set backoffice-disable 1
28
29 # Return true if two files are similar (i.e. not only compress trailing spaces
30 # from a line, but remove any final LF from the file as well)
31 proc similar_file {a b} {
32 set x ""
33

Keyboard Shortcuts

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