Fossil SCM

Test fixes for 2.24 as discussed in [forum:8d774bc3610fe8de|forum post 8d774bc3610fe8de].

preben 2024-01-04 09:58 trunk merge
Commit 271a978d908a58c1873d1cae503b4d884965d8fc828da6eb87d205bd61fd01e7
+3 -1
--- test/amend.test
+++ test/amend.test
@@ -306,13 +306,15 @@
306306
lappend tags -tag $tag
307307
lappend cancels -cancel $tag
308308
}
309309
foreach res $result {
310310
append t1exp ", $res"
311
- append t2exp "sym-$res*"
312311
append t3exp "Add*tag*\"$res\".*"
313312
append t5exp "Cancel*tag*\"$res\".*"
313
+ }
314
+ foreach res [lsort -nocase $result] {
315
+ append t2exp "sym-$res*"
314316
}
315317
eval fossil amend $HASH $tags
316318
test amend-tag-$tc.1 {[string match "*hash:*$HASH*tags:*$t1exp*" $RESULT]}
317319
fossil tag ls --raw $HASH
318320
test amend-tag-$tc.2 {[string match $t2exp $RESULT]}
319321
--- test/amend.test
+++ test/amend.test
@@ -306,13 +306,15 @@
306 lappend tags -tag $tag
307 lappend cancels -cancel $tag
308 }
309 foreach res $result {
310 append t1exp ", $res"
311 append t2exp "sym-$res*"
312 append t3exp "Add*tag*\"$res\".*"
313 append t5exp "Cancel*tag*\"$res\".*"
 
 
 
314 }
315 eval fossil amend $HASH $tags
316 test amend-tag-$tc.1 {[string match "*hash:*$HASH*tags:*$t1exp*" $RESULT]}
317 fossil tag ls --raw $HASH
318 test amend-tag-$tc.2 {[string match $t2exp $RESULT]}
319
--- test/amend.test
+++ test/amend.test
@@ -306,13 +306,15 @@
306 lappend tags -tag $tag
307 lappend cancels -cancel $tag
308 }
309 foreach res $result {
310 append t1exp ", $res"
 
311 append t3exp "Add*tag*\"$res\".*"
312 append t5exp "Cancel*tag*\"$res\".*"
313 }
314 foreach res [lsort -nocase $result] {
315 append t2exp "sym-$res*"
316 }
317 eval fossil amend $HASH $tags
318 test amend-tag-$tc.1 {[string match "*hash:*$HASH*tags:*$t1exp*" $RESULT]}
319 fossil tag ls --raw $HASH
320 test amend-tag-$tc.2 {[string match $t2exp $RESULT]}
321
+1 -1
--- test/json.test
+++ test/json.test
@@ -276,11 +276,11 @@
276276
proc test_hascaps {testname need caps} {
277277
foreach n [split $need {}] {
278278
test $testname-$n {[string first $n $caps] >= 0}
279279
}
280280
}
281
-test_hascaps json-login-c "hmnc" [dict get $AuthAnon capabilities]
281
+test_hascaps json-login-c "hz" [dict get $AuthAnon capabilities]
282282
283283
fossil user new U1 User-1 Uone
284284
fossil user capabilities U1 s
285285
write_file u1 {
286286
{
287287
--- test/json.test
+++ test/json.test
@@ -276,11 +276,11 @@
276 proc test_hascaps {testname need caps} {
277 foreach n [split $need {}] {
278 test $testname-$n {[string first $n $caps] >= 0}
279 }
280 }
281 test_hascaps json-login-c "hmnc" [dict get $AuthAnon capabilities]
282
283 fossil user new U1 User-1 Uone
284 fossil user capabilities U1 s
285 write_file u1 {
286 {
287
--- test/json.test
+++ test/json.test
@@ -276,11 +276,11 @@
276 proc test_hascaps {testname need caps} {
277 foreach n [split $need {}] {
278 test $testname-$n {[string first $n $caps] >= 0}
279 }
280 }
281 test_hascaps json-login-c "hz" [dict get $AuthAnon capabilities]
282
283 fossil user new U1 User-1 Uone
284 fossil user capabilities U1 s
285 write_file u1 {
286 {
287
+24 -24
--- test/merge1.test
+++ test/merge1.test
@@ -73,30 +73,30 @@
7373
333 - This is a test of the merging algohm - 3333
7474
444 - If all goes well, we will be pleased - 4444
7575
555 - we think it well and other stuff too - 5555
7676
}
7777
write_file_indented t23 {
78
- <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
78
+ <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 1)
7979
111 - This is line ONE of the demo program - 1111
80
- ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
80
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 1)
8181
111 - This is line one of the demo program - 1111
82
- ======= MERGED IN content follows ==================================
82
+ ======= MERGED IN content follows =============================== (line 1)
8383
111 - This is line one OF the demo program - 1111
84
- >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
84
+ >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
8585
222 - The second line program line in code - 2222
8686
333 - This is a test of the merging algohm - 3333
8787
444 - If all goes well, we will be pleased - 4444
8888
555 - we think it well and other stuff too - 5555
8989
}
9090
write_file_indented t32 {
91
- <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
91
+ <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 1)
9292
111 - This is line one OF the demo program - 1111
93
- ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
93
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 1)
9494
111 - This is line one of the demo program - 1111
95
- ======= MERGED IN content follows ==================================
95
+ ======= MERGED IN content follows =============================== (line 1)
9696
111 - This is line ONE of the demo program - 1111
97
- >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
97
+ >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
9898
222 - The second line program line in code - 2222
9999
333 - This is a test of the merging algohm - 3333
100100
444 - If all goes well, we will be pleased - 4444
101101
555 - we think it well and other stuff too - 5555
102102
}
@@ -158,30 +158,30 @@
158158
333 - This is a test of the merging algohm - 3333
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 {
163
- <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
164
- ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
163
+ <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 1)
164
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 1)
165165
111 - This is line one of the demo program - 1111
166
- ======= MERGED IN content follows ==================================
166
+ ======= MERGED IN content follows =============================== (line 1)
167167
000 - Zero lines added to the beginning of - 0000
168168
111 - This is line one of the demo program - 1111
169
- >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
169
+ >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
170170
222 - The second line program line in code - 2222
171171
333 - This is a test of the merging algohm - 3333
172172
444 - If all goes well, we will be pleased - 4444
173173
555 - we think it well and other stuff too - 5555
174174
}
175175
write_file_indented t23 {
176
- <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
176
+ <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 1)
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 ||||||||||||||||||||||||| (line 1)
180180
111 - This is line one of the demo program - 1111
181
- ======= MERGED IN content follows ==================================
182
- >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
181
+ ======= MERGED IN content follows =============================== (line 1)
182
+ >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
183183
222 - The second line program line in code - 2222
184184
333 - This is a test of the merging algohm - 3333
185185
444 - If all goes well, we will be pleased - 4444
186186
555 - we think it well and other stuff too - 5555
187187
}
@@ -297,38 +297,38 @@
297297
STUV
298298
XYZ.
299299
}
300300
write_file_indented t23 {
301301
abcd
302
- <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
302
+ <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 2)
303303
efgh 2
304304
ijkl 2
305305
mnop 2
306306
qrst
307307
uvwx
308308
yzAB 2
309309
CDEF 2
310310
GHIJ 2
311
- ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
311
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 2)
312312
efgh
313313
ijkl
314314
mnop
315315
qrst
316316
uvwx
317317
yzAB
318318
CDEF
319319
GHIJ
320
- ======= MERGED IN content follows ==================================
320
+ ======= MERGED IN content follows =============================== (line 2)
321321
efgh
322322
ijkl
323323
mnop 3
324324
qrst 3
325325
uvwx 3
326326
yzAB 3
327327
CDEF
328328
GHIJ
329
- >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
329
+ >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
330330
KLMN
331331
OPQR
332332
STUV
333333
XYZ.
334334
}
@@ -365,38 +365,38 @@
365365
STUV
366366
XYZ.
367367
}
368368
write_file_indented t23 {
369369
abcd
370
- <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
370
+ <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 2)
371371
efgh 2
372372
ijkl 2
373373
mnop
374374
qrst
375375
uvwx
376376
yzAB 2
377377
CDEF 2
378378
GHIJ 2
379
- ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||||||
379
+ ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 2)
380380
efgh
381381
ijkl
382382
mnop
383383
qrst
384384
uvwx
385385
yzAB
386386
CDEF
387387
GHIJ
388
- ======= MERGED IN content follows ==================================
388
+ ======= MERGED IN content follows =============================== (line 2)
389389
efgh
390390
ijkl
391391
mnop 3
392392
qrst 3
393393
uvwx 3
394394
yzAB 3
395395
CDEF
396396
GHIJ
397
- >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
397
+ >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
398398
KLMN
399399
OPQR
400400
STUV
401401
XYZ.
402402
}
403403
--- test/merge1.test
+++ test/merge1.test
@@ -73,30 +73,30 @@
73 333 - This is a test of the merging algohm - 3333
74 444 - If all goes well, we will be pleased - 4444
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
86 333 - This is a test of the merging algohm - 3333
87 444 - If all goes well, we will be pleased - 4444
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
99 333 - This is a test of the merging algohm - 3333
100 444 - If all goes well, we will be pleased - 4444
101 555 - we think it well and other stuff too - 5555
102 }
@@ -158,30 +158,30 @@
158 333 - This is a test of the merging algohm - 3333
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 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
170 222 - The second line program line in code - 2222
171 333 - This is a test of the merging algohm - 3333
172 444 - If all goes well, we will be pleased - 4444
173 555 - we think it well and other stuff too - 5555
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
185 444 - If all goes well, we will be pleased - 4444
186 555 - we think it well and other stuff too - 5555
187 }
@@ -297,38 +297,38 @@
297 STUV
298 XYZ.
299 }
300 write_file_indented t23 {
301 abcd
302 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
303 efgh 2
304 ijkl 2
305 mnop 2
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
317 yzAB
318 CDEF
319 GHIJ
320 ======= MERGED IN content follows ==================================
321 efgh
322 ijkl
323 mnop 3
324 qrst 3
325 uvwx 3
326 yzAB 3
327 CDEF
328 GHIJ
329 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
330 KLMN
331 OPQR
332 STUV
333 XYZ.
334 }
@@ -365,38 +365,38 @@
365 STUV
366 XYZ.
367 }
368 write_file_indented t23 {
369 abcd
370 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
371 efgh 2
372 ijkl 2
373 mnop
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 yzAB
386 CDEF
387 GHIJ
388 ======= MERGED IN content follows ==================================
389 efgh
390 ijkl
391 mnop 3
392 qrst 3
393 uvwx 3
394 yzAB 3
395 CDEF
396 GHIJ
397 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
398 KLMN
399 OPQR
400 STUV
401 XYZ.
402 }
403
--- test/merge1.test
+++ test/merge1.test
@@ -73,30 +73,30 @@
73 333 - This is a test of the merging algohm - 3333
74 444 - If all goes well, we will be pleased - 4444
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 <<<<<<<<<<<< (line 1)
79 111 - This is line ONE of the demo program - 1111
80 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 1)
81 111 - This is line one of the demo program - 1111
82 ======= MERGED IN content follows =============================== (line 1)
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
86 333 - This is a test of the merging algohm - 3333
87 444 - If all goes well, we will be pleased - 4444
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 <<<<<<<<<<<< (line 1)
92 111 - This is line one OF the demo program - 1111
93 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 1)
94 111 - This is line one of the demo program - 1111
95 ======= MERGED IN content follows =============================== (line 1)
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
99 333 - This is a test of the merging algohm - 3333
100 444 - If all goes well, we will be pleased - 4444
101 555 - we think it well and other stuff too - 5555
102 }
@@ -158,30 +158,30 @@
158 333 - This is a test of the merging algohm - 3333
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 <<<<<<<<<<<< (line 1)
164 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 1)
165 111 - This is line one of the demo program - 1111
166 ======= MERGED IN content follows =============================== (line 1)
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 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
170 222 - The second line program line in code - 2222
171 333 - This is a test of the merging algohm - 3333
172 444 - If all goes well, we will be pleased - 4444
173 555 - we think it well and other stuff too - 5555
174 }
175 write_file_indented t23 {
176 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 1)
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 ||||||||||||||||||||||||| (line 1)
180 111 - This is line one of the demo program - 1111
181 ======= MERGED IN content follows =============================== (line 1)
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
185 444 - If all goes well, we will be pleased - 4444
186 555 - we think it well and other stuff too - 5555
187 }
@@ -297,38 +297,38 @@
297 STUV
298 XYZ.
299 }
300 write_file_indented t23 {
301 abcd
302 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 2)
303 efgh 2
304 ijkl 2
305 mnop 2
306 qrst
307 uvwx
308 yzAB 2
309 CDEF 2
310 GHIJ 2
311 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 2)
312 efgh
313 ijkl
314 mnop
315 qrst
316 uvwx
317 yzAB
318 CDEF
319 GHIJ
320 ======= MERGED IN content follows =============================== (line 2)
321 efgh
322 ijkl
323 mnop 3
324 qrst 3
325 uvwx 3
326 yzAB 3
327 CDEF
328 GHIJ
329 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
330 KLMN
331 OPQR
332 STUV
333 XYZ.
334 }
@@ -365,38 +365,38 @@
365 STUV
366 XYZ.
367 }
368 write_file_indented t23 {
369 abcd
370 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 2)
371 efgh 2
372 ijkl 2
373 mnop
374 qrst
375 uvwx
376 yzAB 2
377 CDEF 2
378 GHIJ 2
379 ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 2)
380 efgh
381 ijkl
382 mnop
383 qrst
384 uvwx
385 yzAB
386 CDEF
387 GHIJ
388 ======= MERGED IN content follows =============================== (line 2)
389 efgh
390 ijkl
391 mnop 3
392 qrst 3
393 uvwx 3
394 yzAB 3
395 CDEF
396 GHIJ
397 >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
398 KLMN
399 OPQR
400 STUV
401 XYZ.
402 }
403
+12 -5
--- test/merge3.test
+++ test/merge3.test
@@ -24,15 +24,22 @@
2424
write_file t1 [join [string trim $basis] \n]\n
2525
write_file t2 [join [string trim $v1] \n]\n
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]
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
29
+ regsub -all \
30
+ {<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <+ \(line \d+\)} \
31
+ $x {MINE:} x
32
+ regsub -all \
33
+ {\|\|\|\|\|\|\| COMMON ANCESTOR content follows \|+ \(line \d+\)} \
34
+ $x {COM:} x
35
+ regsub -all \
36
+ {======= MERGED IN content follows =+ \(line \d+\)} \
37
+ $x {YOURS:} x
38
+ regsub -all \
39
+ {>>>>>>> END MERGE CONFLICT >+} \
40
+ $x {END} x
3441
set x [split [string trim $x] \n]
3542
set result [string trim $result]
3643
if {$x!=$result} {
3744
protOut " Expected \[$result\]"
3845
protOut " Got \[$x\]"
3946
--- test/merge3.test
+++ test/merge3.test
@@ -24,15 +24,22 @@
24 write_file t1 [join [string trim $basis] \n]\n
25 write_file t2 [join [string trim $v1] \n]\n
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 protOut " Expected \[$result\]"
38 protOut " Got \[$x\]"
39
--- test/merge3.test
+++ test/merge3.test
@@ -24,15 +24,22 @@
24 write_file t1 [join [string trim $basis] \n]\n
25 write_file t2 [join [string trim $v1] \n]\n
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 \
30 {<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <+ \(line \d+\)} \
31 $x {MINE:} x
32 regsub -all \
33 {\|\|\|\|\|\|\| COMMON ANCESTOR content follows \|+ \(line \d+\)} \
34 $x {COM:} x
35 regsub -all \
36 {======= MERGED IN content follows =+ \(line \d+\)} \
37 $x {YOURS:} x
38 regsub -all \
39 {>>>>>>> END MERGE CONFLICT >+} \
40 $x {END} x
41 set x [split [string trim $x] \n]
42 set result [string trim $result]
43 if {$x!=$result} {
44 protOut " Expected \[$result\]"
45 protOut " Got \[$x\]"
46
--- test/merge4.test
+++ test/merge4.test
@@ -25,17 +25,17 @@
2525
write_file t2 [join [string trim $v1] \n]\n
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]
30
- regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $x {>} x
31
- regsub -all {\|\|\|\|\|\|\|.*=======} $x {=} x
30
+ regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<< \(line \d+\)} $x {>} x
31
+ regsub -all {\|\|\|\|\|\|\|.*======= \(line \d+\)} $x {=} x
3232
regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x
3333
set x [split [string trim $x] \n]
3434
set y [read_file t5]
35
- regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<<} $y {>} y
36
- regsub -all {\|\|\|\|\|\|\|.*=======} $y {=} y
35
+ regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<< \(line \d+\)} $y {>} y
36
+ regsub -all {\|\|\|\|\|\|\|.*======= \(line \d+\)} $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
--- test/merge4.test
+++ test/merge4.test
@@ -25,17 +25,17 @@
25 write_file t2 [join [string trim $v1] \n]\n
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
--- test/merge4.test
+++ test/merge4.test
@@ -25,17 +25,17 @@
25 write_file t2 [join [string trim $v1] \n]\n
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.*<< \(line \d+\)} $x {>} x
31 regsub -all {\|\|\|\|\|\|\|.*======= \(line \d+\)} $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.*<< \(line \d+\)} $y {>} y
36 regsub -all {\|\|\|\|\|\|\|.*======= \(line \d+\)} $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
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -264,18 +264,20 @@
264264
265265
fossil update trunk
266266
fossil merge b1
267267
fossil merge b2
268268
test_status_list merge_renames-8-1 $RESULT {
269
- WARNING: no common ancestor for f1
269
+ MERGE f1
270
+ WARNING: 1 merge conflicts
270271
}
271272
272273
fossil revert
273274
fossil merge --integrate b1
274275
fossil merge b2
275276
test_status_list merge_renames-8-2 $RESULT {
276
- WARNING: no common ancestor for f1
277
+ MERGE f1
278
+ WARNING: 1 merge conflicts
277279
}
278280
279281
#############################################
280282
# Test 9 #
281283
# Merging a delete/rename/add combination #
@@ -308,12 +310,12 @@
308310
test_status_list merge_renames-9-1 $RESULT $expectedMerge
309311
fossil changes
310312
test_status_list merge_renames-9-2 $RESULT "
311313
MERGED_WITH [commit_id b]
312314
ADDED_BY_MERGE f1
313
- RENAMED f2
314
- DELETED f2 (overwritten by rename)
315
+ RENAMED f1 -> f2
316
+ DELETED f2 -> f2 (overwritten by rename)
315317
"
316318
test_file_contents merge_renames-9-3 f1 "f1.1"
317319
test_file_contents merge_renames-9-4 f2 "f1"
318320
319321
# Undo and ensure a dry run merge results in no changes
@@ -368,12 +370,12 @@
368370
RENAME f2 -> f1
369371
}
370372
test_file_contents merge_renames-10-5 f1 "f1"
371373
test_file_contents merge_renames-10-6 f2 "f2"
372374
test_status_list merge_renames-10-7 [fossil changes] "
373
- RENAMED f1
374
- RENAMED f2
375
+ RENAMED f1 -> f2
376
+ RENAMED f2 -> f1
375377
BACKOUT [commit_id trunk]
376378
"
377379
fossil commit -m "swap back" ;# V
378380
379381
fossil merge b
@@ -495,11 +497,11 @@
495497
fossil merge trunk
496498
fossil commit -m "merge trunk" --tag c4
497499
fossil mv --hard f2 f2n
498500
test_status_list merge_renames-13-3 $RESULT "
499501
RENAME f2 f2n
500
- MOVED_FILE $repoDir/f2
502
+ MOVED_FILE [file normalize $repoDir]/f2
501503
"
502504
fossil commit -m "renamed f2->f2n" --tag c5
503505
504506
fossil update trunk
505507
fossil merge b
506508
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -264,18 +264,20 @@
264
265 fossil update trunk
266 fossil merge b1
267 fossil merge b2
268 test_status_list merge_renames-8-1 $RESULT {
269 WARNING: no common ancestor for f1
 
270 }
271
272 fossil revert
273 fossil merge --integrate b1
274 fossil merge b2
275 test_status_list merge_renames-8-2 $RESULT {
276 WARNING: no common ancestor for f1
 
277 }
278
279 #############################################
280 # Test 9 #
281 # Merging a delete/rename/add combination #
@@ -308,12 +310,12 @@
308 test_status_list merge_renames-9-1 $RESULT $expectedMerge
309 fossil changes
310 test_status_list merge_renames-9-2 $RESULT "
311 MERGED_WITH [commit_id b]
312 ADDED_BY_MERGE f1
313 RENAMED f2
314 DELETED f2 (overwritten by rename)
315 "
316 test_file_contents merge_renames-9-3 f1 "f1.1"
317 test_file_contents merge_renames-9-4 f2 "f1"
318
319 # Undo and ensure a dry run merge results in no changes
@@ -368,12 +370,12 @@
368 RENAME f2 -> f1
369 }
370 test_file_contents merge_renames-10-5 f1 "f1"
371 test_file_contents merge_renames-10-6 f2 "f2"
372 test_status_list merge_renames-10-7 [fossil changes] "
373 RENAMED f1
374 RENAMED f2
375 BACKOUT [commit_id trunk]
376 "
377 fossil commit -m "swap back" ;# V
378
379 fossil merge b
@@ -495,11 +497,11 @@
495 fossil merge trunk
496 fossil commit -m "merge trunk" --tag c4
497 fossil mv --hard f2 f2n
498 test_status_list merge_renames-13-3 $RESULT "
499 RENAME f2 f2n
500 MOVED_FILE $repoDir/f2
501 "
502 fossil commit -m "renamed f2->f2n" --tag c5
503
504 fossil update trunk
505 fossil merge b
506
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -264,18 +264,20 @@
264
265 fossil update trunk
266 fossil merge b1
267 fossil merge b2
268 test_status_list merge_renames-8-1 $RESULT {
269 MERGE f1
270 WARNING: 1 merge conflicts
271 }
272
273 fossil revert
274 fossil merge --integrate b1
275 fossil merge b2
276 test_status_list merge_renames-8-2 $RESULT {
277 MERGE f1
278 WARNING: 1 merge conflicts
279 }
280
281 #############################################
282 # Test 9 #
283 # Merging a delete/rename/add combination #
@@ -308,12 +310,12 @@
310 test_status_list merge_renames-9-1 $RESULT $expectedMerge
311 fossil changes
312 test_status_list merge_renames-9-2 $RESULT "
313 MERGED_WITH [commit_id b]
314 ADDED_BY_MERGE f1
315 RENAMED f1 -> f2
316 DELETED f2 -> f2 (overwritten by rename)
317 "
318 test_file_contents merge_renames-9-3 f1 "f1.1"
319 test_file_contents merge_renames-9-4 f2 "f1"
320
321 # Undo and ensure a dry run merge results in no changes
@@ -368,12 +370,12 @@
370 RENAME f2 -> f1
371 }
372 test_file_contents merge_renames-10-5 f1 "f1"
373 test_file_contents merge_renames-10-6 f2 "f2"
374 test_status_list merge_renames-10-7 [fossil changes] "
375 RENAMED f1 -> f2
376 RENAMED f2 -> f1
377 BACKOUT [commit_id trunk]
378 "
379 fossil commit -m "swap back" ;# V
380
381 fossil merge b
@@ -495,11 +497,11 @@
497 fossil merge trunk
498 fossil commit -m "merge trunk" --tag c4
499 fossil mv --hard f2 f2n
500 test_status_list merge_renames-13-3 $RESULT "
501 RENAME f2 f2n
502 MOVED_FILE [file normalize $repoDir]/f2
503 "
504 fossil commit -m "renamed f2->f2n" --tag c5
505
506 fossil update trunk
507 fossil merge b
508
--- test/merge_warn.test
+++ test/merge_warn.test
@@ -42,16 +42,16 @@
4242
fossil update trunk
4343
write_file f1 "f1.1"
4444
write_file f3 "f3.1"
4545
fossil merge --integrate mrg
4646
test_status_list merge_warn-1 $RESULT {
47
- WARNING: no common ancestor for f2
47
+ WARNING: 1 unmanaged files were overwritten
48
+ WARNING: 2 merge conflicts
4849
DELETE f1
50
+ MERGE f2
51
+ ADDED f3 (overwrites an unmanaged file), original copy backed up locally
4952
WARNING: local edits lost for f1
50
- ADDED f3 (overwrites an unmanaged file)
51
- WARNING: 1 merge conflicts
52
- WARNING: 1 unmanaged files were overwritten
5353
}
5454
test merge_warn-2 {
5555
[string first "ignoring --integrate: mrg is not a leaf" $RESULT]>=0
5656
}
5757
5858
--- test/merge_warn.test
+++ test/merge_warn.test
@@ -42,16 +42,16 @@
42 fossil update trunk
43 write_file f1 "f1.1"
44 write_file f3 "f3.1"
45 fossil merge --integrate mrg
46 test_status_list merge_warn-1 $RESULT {
47 WARNING: no common ancestor for f2
 
48 DELETE f1
 
 
49 WARNING: local edits lost for f1
50 ADDED f3 (overwrites an unmanaged file)
51 WARNING: 1 merge conflicts
52 WARNING: 1 unmanaged files were overwritten
53 }
54 test merge_warn-2 {
55 [string first "ignoring --integrate: mrg is not a leaf" $RESULT]>=0
56 }
57
58
--- test/merge_warn.test
+++ test/merge_warn.test
@@ -42,16 +42,16 @@
42 fossil update trunk
43 write_file f1 "f1.1"
44 write_file f3 "f3.1"
45 fossil merge --integrate mrg
46 test_status_list merge_warn-1 $RESULT {
47 WARNING: 1 unmanaged files were overwritten
48 WARNING: 2 merge conflicts
49 DELETE f1
50 MERGE f2
51 ADDED f3 (overwrites an unmanaged file), original copy backed up locally
52 WARNING: local edits lost for f1
 
 
 
53 }
54 test merge_warn-2 {
55 [string first "ignoring --integrate: mrg is not a leaf" $RESULT]>=0
56 }
57
58
--- test/revert.test
+++ test/revert.test
@@ -98,29 +98,29 @@
9898
revert-test 1-2 f0 {
9999
UNMANAGE f0
100100
} -changes {
101101
DELETED f1
102102
EDITED f2
103
- RENAMED f3n
103
+ RENAMED f3 -> f3n
104104
} -addremove {
105105
ADDED f0
106106
} -exists {f0 f2 f3n} -notexists f3
107107
108108
revert-test 1-3 f1 {
109109
REVERT f1
110110
} -changes {
111111
ADDED f0
112112
EDITED f2
113
- RENAMED f3n
113
+ RENAMED f3 -> f3n
114114
} -exists {f0 f1 f2 f3n} -notexists f3
115115
116116
revert-test 1-4 f2 {
117117
REVERT f2
118118
} -changes {
119119
ADDED f0
120120
DELETED f1
121
- RENAMED f3n
121
+ RENAMED f3 -> f3n
122122
} -exists {f0 f2 f3n} -notexists {f1 f3}
123123
124124
# Both files involved in a rename are reverted regardless of which filename
125125
# is used as an argument to 'fossil revert'
126126
#
127127
--- test/revert.test
+++ test/revert.test
@@ -98,29 +98,29 @@
98 revert-test 1-2 f0 {
99 UNMANAGE f0
100 } -changes {
101 DELETED f1
102 EDITED f2
103 RENAMED f3n
104 } -addremove {
105 ADDED f0
106 } -exists {f0 f2 f3n} -notexists f3
107
108 revert-test 1-3 f1 {
109 REVERT f1
110 } -changes {
111 ADDED f0
112 EDITED f2
113 RENAMED f3n
114 } -exists {f0 f1 f2 f3n} -notexists f3
115
116 revert-test 1-4 f2 {
117 REVERT f2
118 } -changes {
119 ADDED f0
120 DELETED f1
121 RENAMED f3n
122 } -exists {f0 f2 f3n} -notexists {f1 f3}
123
124 # Both files involved in a rename are reverted regardless of which filename
125 # is used as an argument to 'fossil revert'
126 #
127
--- test/revert.test
+++ test/revert.test
@@ -98,29 +98,29 @@
98 revert-test 1-2 f0 {
99 UNMANAGE f0
100 } -changes {
101 DELETED f1
102 EDITED f2
103 RENAMED f3 -> f3n
104 } -addremove {
105 ADDED f0
106 } -exists {f0 f2 f3n} -notexists f3
107
108 revert-test 1-3 f1 {
109 REVERT f1
110 } -changes {
111 ADDED f0
112 EDITED f2
113 RENAMED f3 -> f3n
114 } -exists {f0 f1 f2 f3n} -notexists f3
115
116 revert-test 1-4 f2 {
117 REVERT f2
118 } -changes {
119 ADDED f0
120 DELETED f1
121 RENAMED f3 -> f3n
122 } -exists {f0 f2 f3n} -notexists {f1 f3}
123
124 # Both files involved in a rename are reverted regardless of which filename
125 # is used as an argument to 'fossil revert'
126 #
127
--- test/settings-repo.test
+++ test/settings-repo.test
@@ -242,11 +242,11 @@
242242
243243
fossil test-th-eval --open-config "setting $name"
244244
set data [normalize_result]
245245
246246
test settings-set-check2-versionable-$name {
247
- $data eq $value
247
+ $data eq ""
248248
}
249249
250250
file delete $fileName
251251
252252
fossil settings $name --exact
253253
--- test/settings-repo.test
+++ test/settings-repo.test
@@ -242,11 +242,11 @@
242
243 fossil test-th-eval --open-config "setting $name"
244 set data [normalize_result]
245
246 test settings-set-check2-versionable-$name {
247 $data eq $value
248 }
249
250 file delete $fileName
251
252 fossil settings $name --exact
253
--- test/settings-repo.test
+++ test/settings-repo.test
@@ -242,11 +242,11 @@
242
243 fossil test-th-eval --open-config "setting $name"
244 set data [normalize_result]
245
246 test settings-set-check2-versionable-$name {
247 $data eq ""
248 }
249
250 file delete $fileName
251
252 fossil settings $name --exact
253
+4 -4
--- test/stash.test
+++ test/stash.test
@@ -185,11 +185,11 @@
185185
ADDED f0
186186
} -changes {
187187
ADDED f0
188188
MISSING f1
189189
EDITED f2
190
- RENAMED f3n
190
+ RENAMED f3 -> f3n
191191
} -addremove {
192192
DELETED f1
193193
} -exists {f0 f2 f3n} -notexists {f1 f3}
194194
195195
# Confirm there is no longer a stash saved
@@ -292,11 +292,11 @@
292292
fossil mv --hard f2 f2n
293293
test_result_state stash-3-2-mv "mv --hard f2 f2n" [concat {
294294
RENAME f2 f2n
295295
MOVED_FILE} [file normalize f2] {
296296
}] -changes {
297
- RENAMED f2n
297
+ RENAMED f2 -> f2n
298298
} -addremove {
299299
} -exists {f1 f2n} -notexists {f2}
300300
301301
stash-test 3-2 {save -m f2n} {
302302
REVERT f2
@@ -307,11 +307,11 @@
307307
test stash-3-2-show-2 {[regexp {\sf2n} $RESULT]}
308308
stash-test 3-2-pop {pop} {
309309
UPDATE f1
310310
UPDATE f2n
311311
} -changes {
312
- RENAMED f2n
312
+ RENAMED f2 -> f2n
313313
} -addremove {
314314
} -exists {f1 f2n} -notexists {f2}
315315
316316
317317
@@ -368,11 +368,11 @@
368368
stash-test 4-3 {snapshot -m "snap 3"} {
369369
} -changes {
370370
ADDED f0
371371
DELETED f1
372372
EDITED f2
373
- RENAMED f3n
373
+ RENAMED f3 -> f3n
374374
} -addremove {
375375
} -exists {f0 f2 f3n} -notexists {f1 f3}
376376
fossil stash diff
377377
test stash-4-3-diff-CODE {!$::CODE} knownBug
378378
fossil stash show
379379
--- test/stash.test
+++ test/stash.test
@@ -185,11 +185,11 @@
185 ADDED f0
186 } -changes {
187 ADDED f0
188 MISSING f1
189 EDITED f2
190 RENAMED f3n
191 } -addremove {
192 DELETED f1
193 } -exists {f0 f2 f3n} -notexists {f1 f3}
194
195 # Confirm there is no longer a stash saved
@@ -292,11 +292,11 @@
292 fossil mv --hard f2 f2n
293 test_result_state stash-3-2-mv "mv --hard f2 f2n" [concat {
294 RENAME f2 f2n
295 MOVED_FILE} [file normalize f2] {
296 }] -changes {
297 RENAMED f2n
298 } -addremove {
299 } -exists {f1 f2n} -notexists {f2}
300
301 stash-test 3-2 {save -m f2n} {
302 REVERT f2
@@ -307,11 +307,11 @@
307 test stash-3-2-show-2 {[regexp {\sf2n} $RESULT]}
308 stash-test 3-2-pop {pop} {
309 UPDATE f1
310 UPDATE f2n
311 } -changes {
312 RENAMED f2n
313 } -addremove {
314 } -exists {f1 f2n} -notexists {f2}
315
316
317
@@ -368,11 +368,11 @@
368 stash-test 4-3 {snapshot -m "snap 3"} {
369 } -changes {
370 ADDED f0
371 DELETED f1
372 EDITED f2
373 RENAMED f3n
374 } -addremove {
375 } -exists {f0 f2 f3n} -notexists {f1 f3}
376 fossil stash diff
377 test stash-4-3-diff-CODE {!$::CODE} knownBug
378 fossil stash show
379
--- test/stash.test
+++ test/stash.test
@@ -185,11 +185,11 @@
185 ADDED f0
186 } -changes {
187 ADDED f0
188 MISSING f1
189 EDITED f2
190 RENAMED f3 -> f3n
191 } -addremove {
192 DELETED f1
193 } -exists {f0 f2 f3n} -notexists {f1 f3}
194
195 # Confirm there is no longer a stash saved
@@ -292,11 +292,11 @@
292 fossil mv --hard f2 f2n
293 test_result_state stash-3-2-mv "mv --hard f2 f2n" [concat {
294 RENAME f2 f2n
295 MOVED_FILE} [file normalize f2] {
296 }] -changes {
297 RENAMED f2 -> f2n
298 } -addremove {
299 } -exists {f1 f2n} -notexists {f2}
300
301 stash-test 3-2 {save -m f2n} {
302 REVERT f2
@@ -307,11 +307,11 @@
307 test stash-3-2-show-2 {[regexp {\sf2n} $RESULT]}
308 stash-test 3-2-pop {pop} {
309 UPDATE f1
310 UPDATE f2n
311 } -changes {
312 RENAMED f2 -> f2n
313 } -addremove {
314 } -exists {f1 f2n} -notexists {f2}
315
316
317
@@ -368,11 +368,11 @@
368 stash-test 4-3 {snapshot -m "snap 3"} {
369 } -changes {
370 ADDED f0
371 DELETED f1
372 EDITED f2
373 RENAMED f3 -> f3n
374 } -addremove {
375 } -exists {f0 f2 f3n} -notexists {f1 f3}
376 fossil stash diff
377 test stash-4-3-diff-CODE {!$::CODE} knownBug
378 fossil stash show
379
--- test/symlinks.test
+++ test/symlinks.test
@@ -35,10 +35,13 @@
3535
require_no_open_checkout
3636
3737
###############################################################################
3838
3939
test_setup; set rootDir [file normalize [pwd]]
40
+
41
+# Using tempHomePath, allow-symlinks will always be off at this point.
42
+fossil set allow-symlinks on
4043
4144
fossil test-th-eval --open-config {repository}
4245
set repository [normalize_result]
4346
4447
if {[string length $repository] == 0} {
@@ -62,22 +65,31 @@
6265
test symlinks-dir-2 {[file exists [file join $rootDir symdirA f1.txt]] eq 1}
6366
test symlinks-dir-3 {[file exists [file join $rootDir subdirA f2.txt]] eq 1}
6467
test symlinks-dir-4 {[file exists [file join $rootDir symdirA f2.txt]] eq 1}
6568
6669
fossil add [file join $rootDir symdirA f1.txt]
70
+test symlinks-skip-dir-traversal {[normalize_result] eq \
71
+"SKIP symdirA/f1.txt"}
72
+
6773
fossil commit -m "c1"
6874
75
+test symlinks-empty-commit {[normalize_result] eq \
76
+"nothing has changed; use --allow-empty to override"}
77
+
6978
###############################################################################
7079
7180
fossil ls
72
-test symlinks-dir-5 {[normalize_result] eq "symdirA/f1.txt"}
81
+test symlinks-dir-5 {[normalize_result] eq ""}
7382
7483
###############################################################################
84
+
85
+fossil set allow
86
+puts $RESULT
7587
7688
fossil extras
7789
test symlinks-dir-6 {[normalize_result] eq \
78
-"subdirA/f1.txt\nsubdirA/f2.txt\nsymdirA/f2.txt"}
90
+"subdirA/f1.txt\nsubdirA/f2.txt\nsymdirA"}
7991
8092
###############################################################################
8193
8294
fossil close
8395
file delete [file join $rootDir subdirA f1.txt]
@@ -87,17 +99,17 @@
8799
test symlinks-dir-9 {[file exists [file join $rootDir subdirA f2.txt]] eq 1}
88100
test symlinks-dir-10 {[file exists [file join $rootDir symdirA f2.txt]] eq 1}
89101
90102
###############################################################################
91103
92
-fossil open $repository
104
+fossil open --force $repository
93105
set code [catch {file readlink [file join $rootDir symdirA]} result]
94106
95107
test symlinks-dir-11 {$code == 0}
96108
test symlinks-dir-12 {$result eq [file join $rootDir subdirA]}
97
-test symlinks-dir-13 {[file exists [file join $rootDir subdirA f1.txt]] eq 1}
98
-test symlinks-dir-14 {[file exists [file join $rootDir symdirA f1.txt]] eq 1}
109
+test symlinks-dir-13 {[file exists [file join $rootDir subdirA f1.txt]] eq 0}
110
+test symlinks-dir-14 {[file exists [file join $rootDir symdirA f1.txt]] eq 0}
99111
test symlinks-dir-15 {[file exists [file join $rootDir subdirA f2.txt]] eq 1}
100112
test symlinks-dir-16 {[file exists [file join $rootDir symdirA f2.txt]] eq 1}
101113
102114
###############################################################################
103115
#
104116
--- test/symlinks.test
+++ test/symlinks.test
@@ -35,10 +35,13 @@
35 require_no_open_checkout
36
37 ###############################################################################
38
39 test_setup; set rootDir [file normalize [pwd]]
 
 
 
40
41 fossil test-th-eval --open-config {repository}
42 set repository [normalize_result]
43
44 if {[string length $repository] == 0} {
@@ -62,22 +65,31 @@
62 test symlinks-dir-2 {[file exists [file join $rootDir symdirA f1.txt]] eq 1}
63 test symlinks-dir-3 {[file exists [file join $rootDir subdirA f2.txt]] eq 1}
64 test symlinks-dir-4 {[file exists [file join $rootDir symdirA f2.txt]] eq 1}
65
66 fossil add [file join $rootDir symdirA f1.txt]
 
 
 
67 fossil commit -m "c1"
68
 
 
 
69 ###############################################################################
70
71 fossil ls
72 test symlinks-dir-5 {[normalize_result] eq "symdirA/f1.txt"}
73
74 ###############################################################################
 
 
 
75
76 fossil extras
77 test symlinks-dir-6 {[normalize_result] eq \
78 "subdirA/f1.txt\nsubdirA/f2.txt\nsymdirA/f2.txt"}
79
80 ###############################################################################
81
82 fossil close
83 file delete [file join $rootDir subdirA f1.txt]
@@ -87,17 +99,17 @@
87 test symlinks-dir-9 {[file exists [file join $rootDir subdirA f2.txt]] eq 1}
88 test symlinks-dir-10 {[file exists [file join $rootDir symdirA f2.txt]] eq 1}
89
90 ###############################################################################
91
92 fossil open $repository
93 set code [catch {file readlink [file join $rootDir symdirA]} result]
94
95 test symlinks-dir-11 {$code == 0}
96 test symlinks-dir-12 {$result eq [file join $rootDir subdirA]}
97 test symlinks-dir-13 {[file exists [file join $rootDir subdirA f1.txt]] eq 1}
98 test symlinks-dir-14 {[file exists [file join $rootDir symdirA f1.txt]] eq 1}
99 test symlinks-dir-15 {[file exists [file join $rootDir subdirA f2.txt]] eq 1}
100 test symlinks-dir-16 {[file exists [file join $rootDir symdirA f2.txt]] eq 1}
101
102 ###############################################################################
103 #
104
--- test/symlinks.test
+++ test/symlinks.test
@@ -35,10 +35,13 @@
35 require_no_open_checkout
36
37 ###############################################################################
38
39 test_setup; set rootDir [file normalize [pwd]]
40
41 # Using tempHomePath, allow-symlinks will always be off at this point.
42 fossil set allow-symlinks on
43
44 fossil test-th-eval --open-config {repository}
45 set repository [normalize_result]
46
47 if {[string length $repository] == 0} {
@@ -62,22 +65,31 @@
65 test symlinks-dir-2 {[file exists [file join $rootDir symdirA f1.txt]] eq 1}
66 test symlinks-dir-3 {[file exists [file join $rootDir subdirA f2.txt]] eq 1}
67 test symlinks-dir-4 {[file exists [file join $rootDir symdirA f2.txt]] eq 1}
68
69 fossil add [file join $rootDir symdirA f1.txt]
70 test symlinks-skip-dir-traversal {[normalize_result] eq \
71 "SKIP symdirA/f1.txt"}
72
73 fossil commit -m "c1"
74
75 test symlinks-empty-commit {[normalize_result] eq \
76 "nothing has changed; use --allow-empty to override"}
77
78 ###############################################################################
79
80 fossil ls
81 test symlinks-dir-5 {[normalize_result] eq ""}
82
83 ###############################################################################
84
85 fossil set allow
86 puts $RESULT
87
88 fossil extras
89 test symlinks-dir-6 {[normalize_result] eq \
90 "subdirA/f1.txt\nsubdirA/f2.txt\nsymdirA"}
91
92 ###############################################################################
93
94 fossil close
95 file delete [file join $rootDir subdirA f1.txt]
@@ -87,17 +99,17 @@
99 test symlinks-dir-9 {[file exists [file join $rootDir subdirA f2.txt]] eq 1}
100 test symlinks-dir-10 {[file exists [file join $rootDir symdirA f2.txt]] eq 1}
101
102 ###############################################################################
103
104 fossil open --force $repository
105 set code [catch {file readlink [file join $rootDir symdirA]} result]
106
107 test symlinks-dir-11 {$code == 0}
108 test symlinks-dir-12 {$result eq [file join $rootDir subdirA]}
109 test symlinks-dir-13 {[file exists [file join $rootDir subdirA f1.txt]] eq 0}
110 test symlinks-dir-14 {[file exists [file join $rootDir symdirA f1.txt]] eq 0}
111 test symlinks-dir-15 {[file exists [file join $rootDir subdirA f2.txt]] eq 1}
112 test symlinks-dir-16 {[file exists [file join $rootDir symdirA f2.txt]] eq 1}
113
114 ###############################################################################
115 #
116
--- test/tester.tcl
+++ test/tester.tcl
@@ -20,10 +20,15 @@
2020
# tclsh ../test/tester.tcl ../bld/fossil
2121
#
2222
# Where ../test/tester.tcl is the name of this file and ../bld/fossil
2323
# is the name of the executable to be tested.
2424
#
25
+# To run a subset of tests (i.e. only one or more of the test/*.test
26
+# scripts), append the script base names as arguments:
27
+#
28
+# tclsh ../test/tester.tcl ../bld/fossil <script-basename>...
29
+#
2530
2631
# We use some things introduced in 8.6 such as lmap. auto.def should
2732
# have found us a suitable Tcl installation.
2833
package require Tcl 8.6
2934
@@ -278,10 +283,12 @@
278283
access-log \
279284
admin-log \
280285
allow-symlinks \
281286
auto-captcha \
282287
auto-hyperlink \
288
+ auto-hyperlink-delay \
289
+ auto-hyperlink-mouseover \
283290
auto-shun \
284291
autosync \
285292
autosync-tries \
286293
backoffice-disable \
287294
backoffice-logfile \
@@ -292,23 +299,26 @@
292299
chat-initial-history \
293300
chat-inline-images \
294301
chat-keep-count \
295302
chat-keep-days \
296303
chat-poll-timeout \
304
+ chat-timeline-user \
297305
clean-glob \
298306
clearsign \
299307
comment-format \
300308
crlf-glob \
301309
crnl-glob \
302310
default-csp \
303311
default-perms \
304312
diff-binary \
305313
diff-command \
314
+ dont-commit \
306315
dont-push \
307316
dotfiles \
308317
editor \
309318
email-admin \
319
+ email-listid \
310320
email-renew-interval \
311321
email-self \
312322
email-send-command \
313323
email-send-db \
314324
email-send-dir \
@@ -319,18 +329,20 @@
319329
empty-dirs \
320330
encoding-glob \
321331
exec-rel-paths \
322332
fileedit-glob \
323333
forbid-delta-manifests \
334
+ forum-close-policy \
324335
gdiff-command \
325336
gmerge-command \
326337
hash-digits \
327338
hooks \
328339
http-port \
329340
https-login \
330341
ignore-glob \
331342
keep-glob \
343
+ large-file-size \
332344
localauth \
333345
lock-timeout \
334346
main-branch \
335347
mainmenu \
336348
manifest \
@@ -337,18 +349,20 @@
337349
max-cache-entry \
338350
max-loadavg \
339351
max-upload \
340352
mimetypes \
341353
mtime-changes \
354
+ mv-rm-files \
342355
pgp-command \
343356
preferred-diff-type \
344357
proxy \
345358
redirect-to-https \
346359
relative-paths \
347360
repo-cksum \
348361
repolist-skin \
349362
safe-html \
363
+ self-pw-reset \
350364
self-register \
351365
sitemap-extra \
352366
ssh-command \
353367
ssl-ca-location \
354368
ssl-identity \
@@ -1072,10 +1086,19 @@
10721086
please set TEMP variable in environment, error: $error"
10731087
}
10741088
10751089
set tempHomePath [file join $tempPath home_[pid]]
10761090
1091
+# Close stdin to avoid errors on wrapped text for narrow terminals.
1092
+# Closing stdin means that terminal detection returns 0 width, in turn
1093
+# causing the relvant strings to be printed on a single line.
1094
+# However, closing stdin makes file descriptor 0 avaailable on some systems
1095
+# and/or TCL implementations, which triggers fossil to complain about opening
1096
+# databases using fd 0. Avoid this by opening the script, consuming fd 0.
1097
+close stdin
1098
+set possibly_fd0 [open [info script] r]
1099
+
10771100
if {[catch {
10781101
file mkdir $tempHomePath
10791102
} error] != 0} {
10801103
error "Could not make directory \"$tempHomePath\",\
10811104
please set TEMP variable in environment, error: $error"
@@ -1094,10 +1117,14 @@
10941117
test test-framework-$testfile 1
10951118
}
10961119
protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
10971120
}
10981121
unset ::tempKeepHome; delete_temporary_home
1122
+
1123
+# Clean up the file descriptor
1124
+close $possibly_fd0
1125
+
10991126
set nErr [llength $bad_test]
11001127
if {$nErr>0 || !$::QUIET} {
11011128
protOut "***** Final results: $nErr errors out of $test_count tests" 1
11021129
}
11031130
if {$nErr>0} {
11041131
--- test/tester.tcl
+++ test/tester.tcl
@@ -20,10 +20,15 @@
20 # tclsh ../test/tester.tcl ../bld/fossil
21 #
22 # Where ../test/tester.tcl is the name of this file and ../bld/fossil
23 # is the name of the executable to be tested.
24 #
 
 
 
 
 
25
26 # We use some things introduced in 8.6 such as lmap. auto.def should
27 # have found us a suitable Tcl installation.
28 package require Tcl 8.6
29
@@ -278,10 +283,12 @@
278 access-log \
279 admin-log \
280 allow-symlinks \
281 auto-captcha \
282 auto-hyperlink \
 
 
283 auto-shun \
284 autosync \
285 autosync-tries \
286 backoffice-disable \
287 backoffice-logfile \
@@ -292,23 +299,26 @@
292 chat-initial-history \
293 chat-inline-images \
294 chat-keep-count \
295 chat-keep-days \
296 chat-poll-timeout \
 
297 clean-glob \
298 clearsign \
299 comment-format \
300 crlf-glob \
301 crnl-glob \
302 default-csp \
303 default-perms \
304 diff-binary \
305 diff-command \
 
306 dont-push \
307 dotfiles \
308 editor \
309 email-admin \
 
310 email-renew-interval \
311 email-self \
312 email-send-command \
313 email-send-db \
314 email-send-dir \
@@ -319,18 +329,20 @@
319 empty-dirs \
320 encoding-glob \
321 exec-rel-paths \
322 fileedit-glob \
323 forbid-delta-manifests \
 
324 gdiff-command \
325 gmerge-command \
326 hash-digits \
327 hooks \
328 http-port \
329 https-login \
330 ignore-glob \
331 keep-glob \
 
332 localauth \
333 lock-timeout \
334 main-branch \
335 mainmenu \
336 manifest \
@@ -337,18 +349,20 @@
337 max-cache-entry \
338 max-loadavg \
339 max-upload \
340 mimetypes \
341 mtime-changes \
 
342 pgp-command \
343 preferred-diff-type \
344 proxy \
345 redirect-to-https \
346 relative-paths \
347 repo-cksum \
348 repolist-skin \
349 safe-html \
 
350 self-register \
351 sitemap-extra \
352 ssh-command \
353 ssl-ca-location \
354 ssl-identity \
@@ -1072,10 +1086,19 @@
1072 please set TEMP variable in environment, error: $error"
1073 }
1074
1075 set tempHomePath [file join $tempPath home_[pid]]
1076
 
 
 
 
 
 
 
 
 
1077 if {[catch {
1078 file mkdir $tempHomePath
1079 } error] != 0} {
1080 error "Could not make directory \"$tempHomePath\",\
1081 please set TEMP variable in environment, error: $error"
@@ -1094,10 +1117,14 @@
1094 test test-framework-$testfile 1
1095 }
1096 protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
1097 }
1098 unset ::tempKeepHome; delete_temporary_home
 
 
 
 
1099 set nErr [llength $bad_test]
1100 if {$nErr>0 || !$::QUIET} {
1101 protOut "***** Final results: $nErr errors out of $test_count tests" 1
1102 }
1103 if {$nErr>0} {
1104
--- test/tester.tcl
+++ test/tester.tcl
@@ -20,10 +20,15 @@
20 # tclsh ../test/tester.tcl ../bld/fossil
21 #
22 # Where ../test/tester.tcl is the name of this file and ../bld/fossil
23 # is the name of the executable to be tested.
24 #
25 # To run a subset of tests (i.e. only one or more of the test/*.test
26 # scripts), append the script base names as arguments:
27 #
28 # tclsh ../test/tester.tcl ../bld/fossil <script-basename>...
29 #
30
31 # We use some things introduced in 8.6 such as lmap. auto.def should
32 # have found us a suitable Tcl installation.
33 package require Tcl 8.6
34
@@ -278,10 +283,12 @@
283 access-log \
284 admin-log \
285 allow-symlinks \
286 auto-captcha \
287 auto-hyperlink \
288 auto-hyperlink-delay \
289 auto-hyperlink-mouseover \
290 auto-shun \
291 autosync \
292 autosync-tries \
293 backoffice-disable \
294 backoffice-logfile \
@@ -292,23 +299,26 @@
299 chat-initial-history \
300 chat-inline-images \
301 chat-keep-count \
302 chat-keep-days \
303 chat-poll-timeout \
304 chat-timeline-user \
305 clean-glob \
306 clearsign \
307 comment-format \
308 crlf-glob \
309 crnl-glob \
310 default-csp \
311 default-perms \
312 diff-binary \
313 diff-command \
314 dont-commit \
315 dont-push \
316 dotfiles \
317 editor \
318 email-admin \
319 email-listid \
320 email-renew-interval \
321 email-self \
322 email-send-command \
323 email-send-db \
324 email-send-dir \
@@ -319,18 +329,20 @@
329 empty-dirs \
330 encoding-glob \
331 exec-rel-paths \
332 fileedit-glob \
333 forbid-delta-manifests \
334 forum-close-policy \
335 gdiff-command \
336 gmerge-command \
337 hash-digits \
338 hooks \
339 http-port \
340 https-login \
341 ignore-glob \
342 keep-glob \
343 large-file-size \
344 localauth \
345 lock-timeout \
346 main-branch \
347 mainmenu \
348 manifest \
@@ -337,18 +349,20 @@
349 max-cache-entry \
350 max-loadavg \
351 max-upload \
352 mimetypes \
353 mtime-changes \
354 mv-rm-files \
355 pgp-command \
356 preferred-diff-type \
357 proxy \
358 redirect-to-https \
359 relative-paths \
360 repo-cksum \
361 repolist-skin \
362 safe-html \
363 self-pw-reset \
364 self-register \
365 sitemap-extra \
366 ssh-command \
367 ssl-ca-location \
368 ssl-identity \
@@ -1072,10 +1086,19 @@
1086 please set TEMP variable in environment, error: $error"
1087 }
1088
1089 set tempHomePath [file join $tempPath home_[pid]]
1090
1091 # Close stdin to avoid errors on wrapped text for narrow terminals.
1092 # Closing stdin means that terminal detection returns 0 width, in turn
1093 # causing the relvant strings to be printed on a single line.
1094 # However, closing stdin makes file descriptor 0 avaailable on some systems
1095 # and/or TCL implementations, which triggers fossil to complain about opening
1096 # databases using fd 0. Avoid this by opening the script, consuming fd 0.
1097 close stdin
1098 set possibly_fd0 [open [info script] r]
1099
1100 if {[catch {
1101 file mkdir $tempHomePath
1102 } error] != 0} {
1103 error "Could not make directory \"$tempHomePath\",\
1104 please set TEMP variable in environment, error: $error"
@@ -1094,10 +1117,14 @@
1117 test test-framework-$testfile 1
1118 }
1119 protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
1120 }
1121 unset ::tempKeepHome; delete_temporary_home
1122
1123 # Clean up the file descriptor
1124 close $possibly_fd0
1125
1126 set nErr [llength $bad_test]
1127 if {$nErr>0 || !$::QUIET} {
1128 protOut "***** Final results: $nErr errors out of $test_count tests" 1
1129 }
1130 if {$nErr>0} {
1131
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -77,55 +77,55 @@
7777
###############################################################################
7878
7979
fossil test-th-render --open-config \
8080
[file nativename [file join $path th1-tcl3.txt]]
8181
82
-test th1-tcl-3 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
82
+test th1-tcl-3 {$RESULT eq {<hr><p class="thmainError">ERROR:\
8383
invalid command name &quot;bad_command&quot;</p>}}
8484
8585
###############################################################################
8686
8787
fossil test-th-render --open-config \
8888
[file nativename [file join $path th1-tcl4.txt]]
8989
90
-test th1-tcl-4 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
90
+test th1-tcl-4 {$RESULT eq {<hr><p class="thmainError">ERROR:\
9191
divide by zero</p>}}
9292
9393
###############################################################################
9494
9595
fossil test-th-render --open-config \
9696
[file nativename [file join $path th1-tcl5.txt]]
9797
98
-test th1-tcl-5 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
99
-Tcl command not found: bad_command</p>} || $RESULT eq {<hr /><p\
98
+test th1-tcl-5 {$RESULT eq {<hr><p class="thmainError">ERROR:\
99
+Tcl command not found: bad_command</p>} || $RESULT eq {<hr><p\
100100
class="thmainError">ERROR: invalid command name &quot;bad_command&quot;</p>}}
101101
102102
###############################################################################
103103
104104
fossil test-th-render --open-config \
105105
[file nativename [file join $path th1-tcl6.txt]]
106106
107
-test th1-tcl-6 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
107
+test th1-tcl-6 {$RESULT eq {<hr><p class="thmainError">ERROR:\
108108
no such command: bad_command</p>}}
109109
110110
###############################################################################
111111
112112
fossil test-th-render --open-config \
113113
[file nativename [file join $path th1-tcl7.txt]]
114114
115
-test th1-tcl-7 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
115
+test th1-tcl-7 {$RESULT eq {<hr><p class="thmainError">ERROR:\
116116
syntax error in expression: &quot;2**0&quot;</p>}}
117117
118118
###############################################################################
119119
120120
fossil test-th-render --open-config \
121121
[file nativename [file join $path th1-tcl8.txt]]
122122
123
-test th1-tcl-8 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
124
-cannot invoke Tcl command: tailcall</p>} || $RESULT eq {<hr /><p\
123
+test th1-tcl-8 {$RESULT eq {<hr><p class="thmainError">ERROR:\
124
+cannot invoke Tcl command: tailcall</p>} || $RESULT eq {<hr><p\
125125
class="thmainError">ERROR: tailcall can only be called from a proc or\
126
-lambda</p>} || $RESULT eq {<hr /><p class="thmainError">ERROR: This test\
126
+lambda</p>} || $RESULT eq {<hr><p class="thmainError">ERROR: This test\
127127
requires Tcl 8.6 or higher.</p>}}
128128
129129
###############################################################################
130130
131131
fossil test-th-render --open-config \
132132
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -77,55 +77,55 @@
77 ###############################################################################
78
79 fossil test-th-render --open-config \
80 [file nativename [file join $path th1-tcl3.txt]]
81
82 test th1-tcl-3 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
83 invalid command name &quot;bad_command&quot;</p>}}
84
85 ###############################################################################
86
87 fossil test-th-render --open-config \
88 [file nativename [file join $path th1-tcl4.txt]]
89
90 test th1-tcl-4 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
91 divide by zero</p>}}
92
93 ###############################################################################
94
95 fossil test-th-render --open-config \
96 [file nativename [file join $path th1-tcl5.txt]]
97
98 test th1-tcl-5 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
99 Tcl command not found: bad_command</p>} || $RESULT eq {<hr /><p\
100 class="thmainError">ERROR: invalid command name &quot;bad_command&quot;</p>}}
101
102 ###############################################################################
103
104 fossil test-th-render --open-config \
105 [file nativename [file join $path th1-tcl6.txt]]
106
107 test th1-tcl-6 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
108 no such command: bad_command</p>}}
109
110 ###############################################################################
111
112 fossil test-th-render --open-config \
113 [file nativename [file join $path th1-tcl7.txt]]
114
115 test th1-tcl-7 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
116 syntax error in expression: &quot;2**0&quot;</p>}}
117
118 ###############################################################################
119
120 fossil test-th-render --open-config \
121 [file nativename [file join $path th1-tcl8.txt]]
122
123 test th1-tcl-8 {$RESULT eq {<hr /><p class="thmainError">ERROR:\
124 cannot invoke Tcl command: tailcall</p>} || $RESULT eq {<hr /><p\
125 class="thmainError">ERROR: tailcall can only be called from a proc or\
126 lambda</p>} || $RESULT eq {<hr /><p class="thmainError">ERROR: This test\
127 requires Tcl 8.6 or higher.</p>}}
128
129 ###############################################################################
130
131 fossil test-th-render --open-config \
132
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -77,55 +77,55 @@
77 ###############################################################################
78
79 fossil test-th-render --open-config \
80 [file nativename [file join $path th1-tcl3.txt]]
81
82 test th1-tcl-3 {$RESULT eq {<hr><p class="thmainError">ERROR:\
83 invalid command name &quot;bad_command&quot;</p>}}
84
85 ###############################################################################
86
87 fossil test-th-render --open-config \
88 [file nativename [file join $path th1-tcl4.txt]]
89
90 test th1-tcl-4 {$RESULT eq {<hr><p class="thmainError">ERROR:\
91 divide by zero</p>}}
92
93 ###############################################################################
94
95 fossil test-th-render --open-config \
96 [file nativename [file join $path th1-tcl5.txt]]
97
98 test th1-tcl-5 {$RESULT eq {<hr><p class="thmainError">ERROR:\
99 Tcl command not found: bad_command</p>} || $RESULT eq {<hr><p\
100 class="thmainError">ERROR: invalid command name &quot;bad_command&quot;</p>}}
101
102 ###############################################################################
103
104 fossil test-th-render --open-config \
105 [file nativename [file join $path th1-tcl6.txt]]
106
107 test th1-tcl-6 {$RESULT eq {<hr><p class="thmainError">ERROR:\
108 no such command: bad_command</p>}}
109
110 ###############################################################################
111
112 fossil test-th-render --open-config \
113 [file nativename [file join $path th1-tcl7.txt]]
114
115 test th1-tcl-7 {$RESULT eq {<hr><p class="thmainError">ERROR:\
116 syntax error in expression: &quot;2**0&quot;</p>}}
117
118 ###############################################################################
119
120 fossil test-th-render --open-config \
121 [file nativename [file join $path th1-tcl8.txt]]
122
123 test th1-tcl-8 {$RESULT eq {<hr><p class="thmainError">ERROR:\
124 cannot invoke Tcl command: tailcall</p>} || $RESULT eq {<hr><p\
125 class="thmainError">ERROR: tailcall can only be called from a proc or\
126 lambda</p>} || $RESULT eq {<hr><p class="thmainError">ERROR: This test\
127 requires Tcl 8.6 or higher.</p>}}
128
129 ###############################################################################
130
131 fossil test-th-render --open-config \
132
+13 -11
--- test/th1.test
+++ test/th1.test
@@ -739,18 +739,18 @@
739739
$normalized_result {} normalized_result
740740
741741
if {$th1Hooks} {
742742
test th1-trace-2 {$normalized_result eq \
743743
{------------------ BEGIN TRACE LOG ------------------
744
-th1-init 0x0 => 0x0<br />
744
+th1-init 0x0 => 0x0<br>
745745
746746
------------------- END TRACE LOG -------------------}}
747747
} else {
748748
test th1-trace-2 {$normalized_result eq \
749749
{------------------ BEGIN TRACE LOG ------------------
750
-th1-init 0x0 => 0x0<br />
751
-th1-setup {} => TH_OK<br />
750
+th1-init 0x0 => 0x0<br>
751
+th1-setup {} => TH_OK<br>
752752
753753
------------------- END TRACE LOG -------------------}}
754754
}
755755
756756
###############################################################################
@@ -767,18 +767,18 @@
767767
$normalized_result {} normalized_result
768768
769769
if {$th1Hooks} {
770770
test th1-trace-4 {$normalized_result eq \
771771
{------------------ BEGIN TRACE LOG ------------------
772
-th1-init 0x0 => 0x0<br />
772
+th1-init 0x0 => 0x0<br>
773773
this is a trace message.
774774
------------------- END TRACE LOG -------------------}}
775775
} else {
776776
test th1-trace-4 {$normalized_result eq \
777777
{------------------ BEGIN TRACE LOG ------------------
778
-th1-init 0x0 => 0x0<br />
779
-th1-setup {} => TH_OK<br />
778
+th1-init 0x0 => 0x0<br>
779
+th1-setup {} => TH_OK<br>
780780
this is a trace message.
781781
------------------- END TRACE LOG -------------------}}
782782
}
783783
784784
###############################################################################
@@ -789,11 +789,13 @@
789789
790790
###############################################################################
791791
792792
fossil test-th-eval "defHeader"
793793
test th1-defHeader-2 {[string match *<body> [normalize_result]] || \
794
- [string match "*<body class=\"\$current_feature\">" [normalize_result]]}
794
+ [string match "*<body class=\"\$current_feature\
795
+ rpage-\$requested_page\
796
+ cpage-\$canonical_page\">" [normalize_result]]}
795797
796798
###############################################################################
797799
798800
fossil test-th-eval "styleHeader {Page Title Here}"
799801
test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -1062,14 +1064,14 @@
10621064
set base_commands {anoncap anycap array artifact break breakpoint \
10631065
builtin_request_js capexpr captureTh1 catch cgiHeaderLine checkout \
10641066
combobox continue copybtn date decorate defHeader dir enable_htmlify \
10651067
enable_output encode64 error expr for foreach getParameter glob_match \
10661068
globalState hascap hasfeature html htmlize http httpize if info \
1067
- insertCsrf lappend lindex linecount list llength lsearch markdown \
1068
- nonce proc puts query randhex redirect regexp reinitialize rename \
1069
- render repository return searchable set setParameter setting stime \
1070
- string styleFooter styleHeader styleScript tclReady trace unset \
1069
+ insertCsrf lappend lindex linecount list llength lsearch markdown nonce \
1070
+ proc puts query randhex redirect regexp reinitialize rename render \
1071
+ repository return searchable set setParameter setting stime string \
1072
+ styleFooter styleHeader styleScript submenu tclReady trace unset \
10711073
unversioned uplevel upvar utime verifyCsrf verifyLogin wiki}
10721074
set tcl_commands {tclEval tclExpr tclInvoke tclIsSafe tclMakeSafe}
10731075
if {$th1Tcl} {
10741076
test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands $tcl_commands"]}
10751077
} else {
10761078
--- test/th1.test
+++ test/th1.test
@@ -739,18 +739,18 @@
739 $normalized_result {} normalized_result
740
741 if {$th1Hooks} {
742 test th1-trace-2 {$normalized_result eq \
743 {------------------ BEGIN TRACE LOG ------------------
744 th1-init 0x0 => 0x0<br />
745
746 ------------------- END TRACE LOG -------------------}}
747 } else {
748 test th1-trace-2 {$normalized_result eq \
749 {------------------ BEGIN TRACE LOG ------------------
750 th1-init 0x0 => 0x0<br />
751 th1-setup {} => TH_OK<br />
752
753 ------------------- END TRACE LOG -------------------}}
754 }
755
756 ###############################################################################
@@ -767,18 +767,18 @@
767 $normalized_result {} normalized_result
768
769 if {$th1Hooks} {
770 test th1-trace-4 {$normalized_result eq \
771 {------------------ BEGIN TRACE LOG ------------------
772 th1-init 0x0 => 0x0<br />
773 this is a trace message.
774 ------------------- END TRACE LOG -------------------}}
775 } else {
776 test th1-trace-4 {$normalized_result eq \
777 {------------------ BEGIN TRACE LOG ------------------
778 th1-init 0x0 => 0x0<br />
779 th1-setup {} => TH_OK<br />
780 this is a trace message.
781 ------------------- END TRACE LOG -------------------}}
782 }
783
784 ###############################################################################
@@ -789,11 +789,13 @@
789
790 ###############################################################################
791
792 fossil test-th-eval "defHeader"
793 test th1-defHeader-2 {[string match *<body> [normalize_result]] || \
794 [string match "*<body class=\"\$current_feature\">" [normalize_result]]}
 
 
795
796 ###############################################################################
797
798 fossil test-th-eval "styleHeader {Page Title Here}"
799 test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -1062,14 +1064,14 @@
1062 set base_commands {anoncap anycap array artifact break breakpoint \
1063 builtin_request_js capexpr captureTh1 catch cgiHeaderLine checkout \
1064 combobox continue copybtn date decorate defHeader dir enable_htmlify \
1065 enable_output encode64 error expr for foreach getParameter glob_match \
1066 globalState hascap hasfeature html htmlize http httpize if info \
1067 insertCsrf lappend lindex linecount list llength lsearch markdown \
1068 nonce proc puts query randhex redirect regexp reinitialize rename \
1069 render repository return searchable set setParameter setting stime \
1070 string styleFooter styleHeader styleScript tclReady trace unset \
1071 unversioned uplevel upvar utime verifyCsrf verifyLogin wiki}
1072 set tcl_commands {tclEval tclExpr tclInvoke tclIsSafe tclMakeSafe}
1073 if {$th1Tcl} {
1074 test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands $tcl_commands"]}
1075 } else {
1076
--- test/th1.test
+++ test/th1.test
@@ -739,18 +739,18 @@
739 $normalized_result {} normalized_result
740
741 if {$th1Hooks} {
742 test th1-trace-2 {$normalized_result eq \
743 {------------------ BEGIN TRACE LOG ------------------
744 th1-init 0x0 => 0x0<br>
745
746 ------------------- END TRACE LOG -------------------}}
747 } else {
748 test th1-trace-2 {$normalized_result eq \
749 {------------------ BEGIN TRACE LOG ------------------
750 th1-init 0x0 => 0x0<br>
751 th1-setup {} => TH_OK<br>
752
753 ------------------- END TRACE LOG -------------------}}
754 }
755
756 ###############################################################################
@@ -767,18 +767,18 @@
767 $normalized_result {} normalized_result
768
769 if {$th1Hooks} {
770 test th1-trace-4 {$normalized_result eq \
771 {------------------ BEGIN TRACE LOG ------------------
772 th1-init 0x0 => 0x0<br>
773 this is a trace message.
774 ------------------- END TRACE LOG -------------------}}
775 } else {
776 test th1-trace-4 {$normalized_result eq \
777 {------------------ BEGIN TRACE LOG ------------------
778 th1-init 0x0 => 0x0<br>
779 th1-setup {} => TH_OK<br>
780 this is a trace message.
781 ------------------- END TRACE LOG -------------------}}
782 }
783
784 ###############################################################################
@@ -789,11 +789,13 @@
789
790 ###############################################################################
791
792 fossil test-th-eval "defHeader"
793 test th1-defHeader-2 {[string match *<body> [normalize_result]] || \
794 [string match "*<body class=\"\$current_feature\
795 rpage-\$requested_page\
796 cpage-\$canonical_page\">" [normalize_result]]}
797
798 ###############################################################################
799
800 fossil test-th-eval "styleHeader {Page Title Here}"
801 test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -1062,14 +1064,14 @@
1064 set base_commands {anoncap anycap array artifact break breakpoint \
1065 builtin_request_js capexpr captureTh1 catch cgiHeaderLine checkout \
1066 combobox continue copybtn date decorate defHeader dir enable_htmlify \
1067 enable_output encode64 error expr for foreach getParameter glob_match \
1068 globalState hascap hasfeature html htmlize http httpize if info \
1069 insertCsrf lappend lindex linecount list llength lsearch markdown nonce \
1070 proc puts query randhex redirect regexp reinitialize rename render \
1071 repository return searchable set setParameter setting stime string \
1072 styleFooter styleHeader styleScript submenu tclReady trace unset \
1073 unversioned uplevel upvar utime verifyCsrf verifyLogin wiki}
1074 set tcl_commands {tclEval tclExpr tclInvoke tclIsSafe tclMakeSafe}
1075 if {$th1Tcl} {
1076 test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands $tcl_commands"]}
1077 } else {
1078
--- test/unversioned.test
+++ test/unversioned.test
@@ -343,11 +343,11 @@
343343
test unversioned-46 {[regexp \
344344
{Round-trips: 1 Artifacts sent: 0 received: 0
345345
Round-trips: 1 Artifacts sent: 0 received: 0
346346
Round-trips: 2 Artifacts sent: 0 received: 0
347347
Round-trips: 2 Artifacts sent: 0 received: 2
348
-\n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
348
+\n? done, wire bytes sent: \d+ received: \d+ remote: (?:127\.0\.0\.1|::1)} \
349349
[normalize_result]]}
350350
351351
###############################################################################
352352
353353
fossil unversioned ls
@@ -389,11 +389,11 @@
389389
test unversioned-52 {[regexp \
390390
{Round-trips: 1 Artifacts sent: 0 received: 0
391391
Round-trips: 1 Artifacts sent: 0 received: 0
392392
Round-trips: 2 Artifacts sent: 0 received: 0
393393
Round-trips: 2 Artifacts sent: 0 received: 2
394
-\n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
394
+\n? done, wire bytes sent: \d+ received: \d+ remote: (?:127\.0\.0\.1|::1)} \
395395
[normalize_result]]}
396396
397397
###############################################################################
398398
399399
fossil unversioned list
@@ -414,11 +414,11 @@
414414
test unversioned-55 {[regexp \
415415
{Round-trips: 1 Artifacts sent: 0 received: 0
416416
Round-trips: 1 Artifacts sent: 0 received: 0
417417
Round-trips: 2 Artifacts sent: 1 received: 0
418418
Round-trips: 2 Artifacts sent: 1 received: 0
419
-\n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
419
+\n? done, wire bytes sent: \d+ received: \d+ remote: (?:127\.0\.0\.1|::1)} \
420420
[normalize_result]]}
421421
422422
###############################################################################
423423
424424
fossil close
425425
--- test/unversioned.test
+++ test/unversioned.test
@@ -343,11 +343,11 @@
343 test unversioned-46 {[regexp \
344 {Round-trips: 1 Artifacts sent: 0 received: 0
345 Round-trips: 1 Artifacts sent: 0 received: 0
346 Round-trips: 2 Artifacts sent: 0 received: 0
347 Round-trips: 2 Artifacts sent: 0 received: 2
348 \n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
349 [normalize_result]]}
350
351 ###############################################################################
352
353 fossil unversioned ls
@@ -389,11 +389,11 @@
389 test unversioned-52 {[regexp \
390 {Round-trips: 1 Artifacts sent: 0 received: 0
391 Round-trips: 1 Artifacts sent: 0 received: 0
392 Round-trips: 2 Artifacts sent: 0 received: 0
393 Round-trips: 2 Artifacts sent: 0 received: 2
394 \n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
395 [normalize_result]]}
396
397 ###############################################################################
398
399 fossil unversioned list
@@ -414,11 +414,11 @@
414 test unversioned-55 {[regexp \
415 {Round-trips: 1 Artifacts sent: 0 received: 0
416 Round-trips: 1 Artifacts sent: 0 received: 0
417 Round-trips: 2 Artifacts sent: 1 received: 0
418 Round-trips: 2 Artifacts sent: 1 received: 0
419 \n? done, sent: \d+ received: \d+ ip: (?:127\.0\.0\.1|::1)} \
420 [normalize_result]]}
421
422 ###############################################################################
423
424 fossil close
425
--- test/unversioned.test
+++ test/unversioned.test
@@ -343,11 +343,11 @@
343 test unversioned-46 {[regexp \
344 {Round-trips: 1 Artifacts sent: 0 received: 0
345 Round-trips: 1 Artifacts sent: 0 received: 0
346 Round-trips: 2 Artifacts sent: 0 received: 0
347 Round-trips: 2 Artifacts sent: 0 received: 2
348 \n? done, wire bytes sent: \d+ received: \d+ remote: (?:127\.0\.0\.1|::1)} \
349 [normalize_result]]}
350
351 ###############################################################################
352
353 fossil unversioned ls
@@ -389,11 +389,11 @@
389 test unversioned-52 {[regexp \
390 {Round-trips: 1 Artifacts sent: 0 received: 0
391 Round-trips: 1 Artifacts sent: 0 received: 0
392 Round-trips: 2 Artifacts sent: 0 received: 0
393 Round-trips: 2 Artifacts sent: 0 received: 2
394 \n? done, wire bytes sent: \d+ received: \d+ remote: (?:127\.0\.0\.1|::1)} \
395 [normalize_result]]}
396
397 ###############################################################################
398
399 fossil unversioned list
@@ -414,11 +414,11 @@
414 test unversioned-55 {[regexp \
415 {Round-trips: 1 Artifacts sent: 0 received: 0
416 Round-trips: 1 Artifacts sent: 0 received: 0
417 Round-trips: 2 Artifacts sent: 1 received: 0
418 Round-trips: 2 Artifacts sent: 1 received: 0
419 \n? done, wire bytes sent: \d+ received: \d+ remote: (?:127\.0\.0\.1|::1)} \
420 [normalize_result]]}
421
422 ###############################################################################
423
424 fossil close
425

Keyboard Shortcuts

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