Fossil SCM

Add -expectError to a number of tests that are expected to generate errors or output.

preben 2024-01-10 09:36 testing-improvements
Commit 768d93e6ee8cc72c78fe78d1493f6f1925317925308ea8e285c23ac01f88fd68
--- test/merge1.test
+++ test/merge1.test
@@ -98,13 +98,13 @@
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
}
103
-fossil 3-way-merge t1 t3 t2 a32
103
+fossil 3-way-merge t1 t3 t2 a32 -expectError
104104
test merge1-2.1 {[same_file t32 a32]}
105
-fossil 3-way-merge t1 t2 t3 a23
105
+fossil 3-way-merge t1 t2 t3 a23 -expectError
106106
test merge1-2.2 {[same_file t23 a23]}
107107
108108
write_file_indented t1 {
109109
111 - This is line one of the demo program - 1111
110110
222 - The second line program line in code - 2222
@@ -183,13 +183,13 @@
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
}
188
-fossil 3-way-merge t1 t3 t2 a32
188
+fossil 3-way-merge t1 t3 t2 a32 -expectError
189189
test merge1-4.1 {[same_file t32 a32]}
190
-fossil 3-way-merge t1 t2 t3 a23
190
+fossil 3-way-merge t1 t2 t3 a23 -expectError
191191
test merge1-4.2 {[same_file t23 a23]}
192192
193193
write_file_indented t1 {
194194
111 - This is line one of the demo program - 1111
195195
222 - The second line program line in code - 2222
@@ -330,11 +330,11 @@
330330
KLMN
331331
OPQR
332332
STUV
333333
XYZ.
334334
}
335
-fossil 3-way-merge t1 t2 t3 a23
335
+fossil 3-way-merge t1 t2 t3 a23 -expectError
336336
test merge1-7.1 {[same_file t23 a23]}
337337
338338
write_file_indented t2 {
339339
abcd
340340
efgh 2
@@ -398,11 +398,11 @@
398398
KLMN
399399
OPQR
400400
STUV
401401
XYZ.
402402
}
403
-fossil 3-way-merge t1 t2 t3 a23
403
+fossil 3-way-merge t1 t2 t3 a23 -expectError
404404
test merge1-7.2 {[same_file t23 a23]}
405405
406406
###############################################################################
407407
408408
test_cleanup
409409
--- test/merge1.test
+++ test/merge1.test
@@ -98,13 +98,13 @@
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 }
103 fossil 3-way-merge t1 t3 t2 a32
104 test merge1-2.1 {[same_file t32 a32]}
105 fossil 3-way-merge t1 t2 t3 a23
106 test merge1-2.2 {[same_file t23 a23]}
107
108 write_file_indented t1 {
109 111 - This is line one of the demo program - 1111
110 222 - The second line program line in code - 2222
@@ -183,13 +183,13 @@
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 }
188 fossil 3-way-merge t1 t3 t2 a32
189 test merge1-4.1 {[same_file t32 a32]}
190 fossil 3-way-merge t1 t2 t3 a23
191 test merge1-4.2 {[same_file t23 a23]}
192
193 write_file_indented t1 {
194 111 - This is line one of the demo program - 1111
195 222 - The second line program line in code - 2222
@@ -330,11 +330,11 @@
330 KLMN
331 OPQR
332 STUV
333 XYZ.
334 }
335 fossil 3-way-merge t1 t2 t3 a23
336 test merge1-7.1 {[same_file t23 a23]}
337
338 write_file_indented t2 {
339 abcd
340 efgh 2
@@ -398,11 +398,11 @@
398 KLMN
399 OPQR
400 STUV
401 XYZ.
402 }
403 fossil 3-way-merge t1 t2 t3 a23
404 test merge1-7.2 {[same_file t23 a23]}
405
406 ###############################################################################
407
408 test_cleanup
409
--- test/merge1.test
+++ test/merge1.test
@@ -98,13 +98,13 @@
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 }
103 fossil 3-way-merge t1 t3 t2 a32 -expectError
104 test merge1-2.1 {[same_file t32 a32]}
105 fossil 3-way-merge t1 t2 t3 a23 -expectError
106 test merge1-2.2 {[same_file t23 a23]}
107
108 write_file_indented t1 {
109 111 - This is line one of the demo program - 1111
110 222 - The second line program line in code - 2222
@@ -183,13 +183,13 @@
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 }
188 fossil 3-way-merge t1 t3 t2 a32 -expectError
189 test merge1-4.1 {[same_file t32 a32]}
190 fossil 3-way-merge t1 t2 t3 a23 -expectError
191 test merge1-4.2 {[same_file t23 a23]}
192
193 write_file_indented t1 {
194 111 - This is line one of the demo program - 1111
195 222 - The second line program line in code - 2222
@@ -330,11 +330,11 @@
330 KLMN
331 OPQR
332 STUV
333 XYZ.
334 }
335 fossil 3-way-merge t1 t2 t3 a23 -expectError
336 test merge1-7.1 {[same_file t23 a23]}
337
338 write_file_indented t2 {
339 abcd
340 efgh 2
@@ -398,11 +398,11 @@
398 KLMN
399 OPQR
400 STUV
401 XYZ.
402 }
403 fossil 3-way-merge t1 t2 t3 a23 -expectError
404 test merge1-7.2 {[same_file t23 a23]}
405
406 ###############################################################################
407
408 test_cleanup
409
+27 -27
--- test/merge3.test
+++ test/merge3.test
@@ -18,15 +18,15 @@
1818
# Tests of the 3-way merge
1919
#
2020
2121
test_setup ""
2222
23
-proc merge-test {testid basis v1 v2 result} {
23
+proc merge-test {testid basis v1 v2 result {fossil_args ""}} {
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
27
- fossil 3-way-merge t1 t2 t3 t4
27
+ fossil 3-way-merge t1 t2 t3 t4 {*}$fossil_args
2828
set x [read_file t4]
2929
regsub -all \
3030
{<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <+ \(line \d+\)} \
3131
$x {MINE:} x
3232
regsub -all \
@@ -74,56 +74,56 @@
7474
1 2 3b 4b 5b 6 7 8 9
7575
} {
7676
1 2 3 4 5c 6 7 8 9
7777
} {
7878
1 2 MINE: 3b 4b 5b COM: 3 4 5 YOURS: 3 4 5c END 6 7 8 9
79
-}
79
+} -expectError
8080
merge-test 4 {
8181
1 2 3 4 5 6 7 8 9
8282
} {
8383
1 2 3b 4b 5b 6b 7 8 9
8484
} {
8585
1 2 3 4 5c 6 7 8 9
8686
} {
8787
1 2 MINE: 3b 4b 5b 6b COM: 3 4 5 6 YOURS: 3 4 5c 6 END 7 8 9
88
-}
88
+} -expectError
8989
merge-test 5 {
9090
1 2 3 4 5 6 7 8 9
9191
} {
9292
1 2 3b 4b 5b 6b 7 8 9
9393
} {
9494
1 2 3 4 5c 6c 7c 8 9
9595
} {
9696
1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8 9
97
-}
97
+} -expectError
9898
merge-test 6 {
9999
1 2 3 4 5 6 7 8 9
100100
} {
101101
1 2 3b 4b 5b 6b 7 8b 9
102102
} {
103103
1 2 3 4 5c 6c 7c 8 9
104104
} {
105105
1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8b 9
106
-}
106
+} -expectError
107107
merge-test 7 {
108108
1 2 3 4 5 6 7 8 9
109109
} {
110110
1 2 3b 4b 5b 6b 7 8b 9
111111
} {
112112
1 2 3 4 5c 6c 7c 8c 9
113113
} {
114114
1 2 MINE: 3b 4b 5b 6b 7 8b COM: 3 4 5 6 7 8 YOURS: 3 4 5c 6c 7c 8c END 9
115
-}
115
+} -expectError
116116
merge-test 8 {
117117
1 2 3 4 5 6 7 8 9
118118
} {
119119
1 2 3b 4b 5b 6b 7 8b 9b
120120
} {
121121
1 2 3 4 5c 6c 7c 8c 9
122122
} {
123123
1 2 MINE: 3b 4b 5b 6b 7 8b 9b COM: 3 4 5 6 7 8 9 YOURS: 3 4 5c 6c 7c 8c 9 END
124
-}
124
+} -expectError
125125
merge-test 9 {
126126
1 2 3 4 5 6 7 8 9
127127
} {
128128
1 2 3b 4b 5 6 7 8b 9b
129129
} {
@@ -147,11 +147,11 @@
147147
1 2 3b 4b 5 6 7 8b 9b
148148
} {
149149
1 2 3b 4c 5 6c 7c 8 9
150150
} {
151151
1 2 MINE: 3b 4b COM: 3 4 YOURS: 3b 4c END 5 6c 7c 8b 9b
152
-}
152
+} -expectError
153153
merge-test 12 {
154154
1 2 3 4 5 6 7 8 9
155155
} {
156156
1 2 3b4b 5 6 7 8b 9b
157157
} {
@@ -202,20 +202,20 @@
202202
1 6 7 8 9
203203
} {
204204
1 2 3 4 9
205205
} {
206206
1 MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9
207
-}
207
+} -expectError
208208
merge-test 25 {
209209
1 2 3 4 5 6 7 8 9
210210
} {
211211
1 7 8 9
212212
} {
213213
1 2 3 9
214214
} {
215215
1 MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9
216
-}
216
+} -expectError
217217
218218
merge-test 30 {
219219
1 2 3 4 5 6 7 8 9
220220
} {
221221
1 2 3 4 5 6 7 9
@@ -257,20 +257,20 @@
257257
1 2 3 4 9
258258
} {
259259
1 6 7 8 9
260260
} {
261261
1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END 9
262
-}
262
+} -expectError
263263
merge-test 35 {
264264
1 2 3 4 5 6 7 8 9
265265
} {
266266
1 2 3 9
267267
} {
268268
1 7 8 9
269269
} {
270270
1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END 9
271
-}
271
+} -expectError
272272
273273
merge-test 40 {
274274
2 3 4 5 6 7 8
275275
} {
276276
3 4 5 6 7 8
@@ -312,20 +312,20 @@
312312
6 7 8
313313
} {
314314
2 3 4
315315
} {
316316
MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END
317
-}
317
+} -expectError
318318
merge-test 45 {
319319
2 3 4 5 6 7 8
320320
} {
321321
7 8
322322
} {
323323
2 3
324324
} {
325325
MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END
326
-}
326
+} -expectError
327327
328328
merge-test 50 {
329329
2 3 4 5 6 7 8
330330
} {
331331
2 3 4 5 6 7
@@ -366,20 +366,20 @@
366366
2 3 4
367367
} {
368368
6 7 8
369369
} {
370370
MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END
371
-}
371
+} -expectError
372372
merge-test 55 {
373373
2 3 4 5 6 7 8
374374
} {
375375
2 3
376376
} {
377377
7 8
378378
} {
379379
MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END
380
-}
380
+} -expectError
381381
382382
merge-test 60 {
383383
1 2 3 4 5 6 7 8 9
384384
} {
385385
1 2b 3 4 5 6 7 8 9
@@ -421,20 +421,20 @@
421421
1 2b 3b 4b 5b 6 7 8 9
422422
} {
423423
1 2 3 4 9
424424
} {
425425
1 MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9
426
-}
426
+} -expectError
427427
merge-test 65 {
428428
1 2 3 4 5 6 7 8 9
429429
} {
430430
1 2b 3b 4b 5b 6b 7 8 9
431431
} {
432432
1 2 3 9
433433
} {
434434
1 MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9
435
-}
435
+} -expectError
436436
437437
merge-test 70 {
438438
1 2 3 4 5 6 7 8 9
439439
} {
440440
1 2 3 4 5 6 7 9
@@ -476,20 +476,20 @@
476476
1 2 3 4 9
477477
} {
478478
1 2b 3b 4b 5b 6 7 8 9
479479
} {
480480
1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END 9
481
-}
481
+} -expectError
482482
merge-test 75 {
483483
1 2 3 4 5 6 7 8 9
484484
} {
485485
1 2 3 9
486486
} {
487487
1 2b 3b 4b 5b 6b 7 8 9
488488
} {
489489
1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END 9
490
-}
490
+} -expectError
491491
492492
merge-test 80 {
493493
2 3 4 5 6 7 8
494494
} {
495495
2b 3 4 5 6 7 8
@@ -531,20 +531,20 @@
531531
2b 3b 4b 5b 6 7 8
532532
} {
533533
2 3 4
534534
} {
535535
MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END
536
-}
536
+} -expectError
537537
merge-test 85 {
538538
2 3 4 5 6 7 8
539539
} {
540540
2b 3b 4b 5b 6b 7 8
541541
} {
542542
2 3
543543
} {
544544
MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END
545
-}
545
+} -expectError
546546
547547
merge-test 90 {
548548
2 3 4 5 6 7 8
549549
} {
550550
2 3 4 5 6 7
@@ -586,20 +586,20 @@
586586
2 3 4
587587
} {
588588
2b 3b 4b 5b 6 7 8
589589
} {
590590
MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END
591
-}
591
+} -expectError
592592
merge-test 95 {
593593
2 3 4 5 6 7 8
594594
} {
595595
2 3
596596
} {
597597
2b 3b 4b 5b 6b 7 8
598598
} {
599599
MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END
600
-}
600
+} -expectError
601601
602602
merge-test 100 {
603603
1 2 3 4 5 6 7 8 9
604604
} {
605605
1 2b 3 4 5 7 8 9 a b c d e
@@ -632,19 +632,19 @@
632632
1 2 3 4 5 7 8 9b
633633
} {
634634
1 2 3 4 5 7 8 9b a b c d e
635635
} {
636636
1 2 3 4 5 7 8 MINE: 9b COM: 9 YOURS: 9b a b c d e END
637
-}
637
+} -expectError
638638
merge-test 104 {
639639
1 2 3 4 5 6 7 8 9
640640
} {
641641
1 2 3 4 5 7 8 9b a b c d e
642642
} {
643643
1 2 3 4 5 7 8 9b
644644
} {
645645
1 2 3 4 5 7 8 MINE: 9b a b c d e COM: 9 YOURS: 9b END
646
-}
646
+} -expectError
647647
648648
###############################################################################
649649
650650
test_cleanup
651651
--- test/merge3.test
+++ test/merge3.test
@@ -18,15 +18,15 @@
18 # Tests of the 3-way merge
19 #
20
21 test_setup ""
22
23 proc merge-test {testid basis v1 v2 result} {
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 \
@@ -74,56 +74,56 @@
74 1 2 3b 4b 5b 6 7 8 9
75 } {
76 1 2 3 4 5c 6 7 8 9
77 } {
78 1 2 MINE: 3b 4b 5b COM: 3 4 5 YOURS: 3 4 5c END 6 7 8 9
79 }
80 merge-test 4 {
81 1 2 3 4 5 6 7 8 9
82 } {
83 1 2 3b 4b 5b 6b 7 8 9
84 } {
85 1 2 3 4 5c 6 7 8 9
86 } {
87 1 2 MINE: 3b 4b 5b 6b COM: 3 4 5 6 YOURS: 3 4 5c 6 END 7 8 9
88 }
89 merge-test 5 {
90 1 2 3 4 5 6 7 8 9
91 } {
92 1 2 3b 4b 5b 6b 7 8 9
93 } {
94 1 2 3 4 5c 6c 7c 8 9
95 } {
96 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8 9
97 }
98 merge-test 6 {
99 1 2 3 4 5 6 7 8 9
100 } {
101 1 2 3b 4b 5b 6b 7 8b 9
102 } {
103 1 2 3 4 5c 6c 7c 8 9
104 } {
105 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8b 9
106 }
107 merge-test 7 {
108 1 2 3 4 5 6 7 8 9
109 } {
110 1 2 3b 4b 5b 6b 7 8b 9
111 } {
112 1 2 3 4 5c 6c 7c 8c 9
113 } {
114 1 2 MINE: 3b 4b 5b 6b 7 8b COM: 3 4 5 6 7 8 YOURS: 3 4 5c 6c 7c 8c END 9
115 }
116 merge-test 8 {
117 1 2 3 4 5 6 7 8 9
118 } {
119 1 2 3b 4b 5b 6b 7 8b 9b
120 } {
121 1 2 3 4 5c 6c 7c 8c 9
122 } {
123 1 2 MINE: 3b 4b 5b 6b 7 8b 9b COM: 3 4 5 6 7 8 9 YOURS: 3 4 5c 6c 7c 8c 9 END
124 }
125 merge-test 9 {
126 1 2 3 4 5 6 7 8 9
127 } {
128 1 2 3b 4b 5 6 7 8b 9b
129 } {
@@ -147,11 +147,11 @@
147 1 2 3b 4b 5 6 7 8b 9b
148 } {
149 1 2 3b 4c 5 6c 7c 8 9
150 } {
151 1 2 MINE: 3b 4b COM: 3 4 YOURS: 3b 4c END 5 6c 7c 8b 9b
152 }
153 merge-test 12 {
154 1 2 3 4 5 6 7 8 9
155 } {
156 1 2 3b4b 5 6 7 8b 9b
157 } {
@@ -202,20 +202,20 @@
202 1 6 7 8 9
203 } {
204 1 2 3 4 9
205 } {
206 1 MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9
207 }
208 merge-test 25 {
209 1 2 3 4 5 6 7 8 9
210 } {
211 1 7 8 9
212 } {
213 1 2 3 9
214 } {
215 1 MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9
216 }
217
218 merge-test 30 {
219 1 2 3 4 5 6 7 8 9
220 } {
221 1 2 3 4 5 6 7 9
@@ -257,20 +257,20 @@
257 1 2 3 4 9
258 } {
259 1 6 7 8 9
260 } {
261 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END 9
262 }
263 merge-test 35 {
264 1 2 3 4 5 6 7 8 9
265 } {
266 1 2 3 9
267 } {
268 1 7 8 9
269 } {
270 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END 9
271 }
272
273 merge-test 40 {
274 2 3 4 5 6 7 8
275 } {
276 3 4 5 6 7 8
@@ -312,20 +312,20 @@
312 6 7 8
313 } {
314 2 3 4
315 } {
316 MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END
317 }
318 merge-test 45 {
319 2 3 4 5 6 7 8
320 } {
321 7 8
322 } {
323 2 3
324 } {
325 MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END
326 }
327
328 merge-test 50 {
329 2 3 4 5 6 7 8
330 } {
331 2 3 4 5 6 7
@@ -366,20 +366,20 @@
366 2 3 4
367 } {
368 6 7 8
369 } {
370 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END
371 }
372 merge-test 55 {
373 2 3 4 5 6 7 8
374 } {
375 2 3
376 } {
377 7 8
378 } {
379 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END
380 }
381
382 merge-test 60 {
383 1 2 3 4 5 6 7 8 9
384 } {
385 1 2b 3 4 5 6 7 8 9
@@ -421,20 +421,20 @@
421 1 2b 3b 4b 5b 6 7 8 9
422 } {
423 1 2 3 4 9
424 } {
425 1 MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9
426 }
427 merge-test 65 {
428 1 2 3 4 5 6 7 8 9
429 } {
430 1 2b 3b 4b 5b 6b 7 8 9
431 } {
432 1 2 3 9
433 } {
434 1 MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9
435 }
436
437 merge-test 70 {
438 1 2 3 4 5 6 7 8 9
439 } {
440 1 2 3 4 5 6 7 9
@@ -476,20 +476,20 @@
476 1 2 3 4 9
477 } {
478 1 2b 3b 4b 5b 6 7 8 9
479 } {
480 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END 9
481 }
482 merge-test 75 {
483 1 2 3 4 5 6 7 8 9
484 } {
485 1 2 3 9
486 } {
487 1 2b 3b 4b 5b 6b 7 8 9
488 } {
489 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END 9
490 }
491
492 merge-test 80 {
493 2 3 4 5 6 7 8
494 } {
495 2b 3 4 5 6 7 8
@@ -531,20 +531,20 @@
531 2b 3b 4b 5b 6 7 8
532 } {
533 2 3 4
534 } {
535 MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END
536 }
537 merge-test 85 {
538 2 3 4 5 6 7 8
539 } {
540 2b 3b 4b 5b 6b 7 8
541 } {
542 2 3
543 } {
544 MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END
545 }
546
547 merge-test 90 {
548 2 3 4 5 6 7 8
549 } {
550 2 3 4 5 6 7
@@ -586,20 +586,20 @@
586 2 3 4
587 } {
588 2b 3b 4b 5b 6 7 8
589 } {
590 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END
591 }
592 merge-test 95 {
593 2 3 4 5 6 7 8
594 } {
595 2 3
596 } {
597 2b 3b 4b 5b 6b 7 8
598 } {
599 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END
600 }
601
602 merge-test 100 {
603 1 2 3 4 5 6 7 8 9
604 } {
605 1 2b 3 4 5 7 8 9 a b c d e
@@ -632,19 +632,19 @@
632 1 2 3 4 5 7 8 9b
633 } {
634 1 2 3 4 5 7 8 9b a b c d e
635 } {
636 1 2 3 4 5 7 8 MINE: 9b COM: 9 YOURS: 9b a b c d e END
637 }
638 merge-test 104 {
639 1 2 3 4 5 6 7 8 9
640 } {
641 1 2 3 4 5 7 8 9b a b c d e
642 } {
643 1 2 3 4 5 7 8 9b
644 } {
645 1 2 3 4 5 7 8 MINE: 9b a b c d e COM: 9 YOURS: 9b END
646 }
647
648 ###############################################################################
649
650 test_cleanup
651
--- test/merge3.test
+++ test/merge3.test
@@ -18,15 +18,15 @@
18 # Tests of the 3-way merge
19 #
20
21 test_setup ""
22
23 proc merge-test {testid basis v1 v2 result {fossil_args ""}} {
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 {*}$fossil_args
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 \
@@ -74,56 +74,56 @@
74 1 2 3b 4b 5b 6 7 8 9
75 } {
76 1 2 3 4 5c 6 7 8 9
77 } {
78 1 2 MINE: 3b 4b 5b COM: 3 4 5 YOURS: 3 4 5c END 6 7 8 9
79 } -expectError
80 merge-test 4 {
81 1 2 3 4 5 6 7 8 9
82 } {
83 1 2 3b 4b 5b 6b 7 8 9
84 } {
85 1 2 3 4 5c 6 7 8 9
86 } {
87 1 2 MINE: 3b 4b 5b 6b COM: 3 4 5 6 YOURS: 3 4 5c 6 END 7 8 9
88 } -expectError
89 merge-test 5 {
90 1 2 3 4 5 6 7 8 9
91 } {
92 1 2 3b 4b 5b 6b 7 8 9
93 } {
94 1 2 3 4 5c 6c 7c 8 9
95 } {
96 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8 9
97 } -expectError
98 merge-test 6 {
99 1 2 3 4 5 6 7 8 9
100 } {
101 1 2 3b 4b 5b 6b 7 8b 9
102 } {
103 1 2 3 4 5c 6c 7c 8 9
104 } {
105 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8b 9
106 } -expectError
107 merge-test 7 {
108 1 2 3 4 5 6 7 8 9
109 } {
110 1 2 3b 4b 5b 6b 7 8b 9
111 } {
112 1 2 3 4 5c 6c 7c 8c 9
113 } {
114 1 2 MINE: 3b 4b 5b 6b 7 8b COM: 3 4 5 6 7 8 YOURS: 3 4 5c 6c 7c 8c END 9
115 } -expectError
116 merge-test 8 {
117 1 2 3 4 5 6 7 8 9
118 } {
119 1 2 3b 4b 5b 6b 7 8b 9b
120 } {
121 1 2 3 4 5c 6c 7c 8c 9
122 } {
123 1 2 MINE: 3b 4b 5b 6b 7 8b 9b COM: 3 4 5 6 7 8 9 YOURS: 3 4 5c 6c 7c 8c 9 END
124 } -expectError
125 merge-test 9 {
126 1 2 3 4 5 6 7 8 9
127 } {
128 1 2 3b 4b 5 6 7 8b 9b
129 } {
@@ -147,11 +147,11 @@
147 1 2 3b 4b 5 6 7 8b 9b
148 } {
149 1 2 3b 4c 5 6c 7c 8 9
150 } {
151 1 2 MINE: 3b 4b COM: 3 4 YOURS: 3b 4c END 5 6c 7c 8b 9b
152 } -expectError
153 merge-test 12 {
154 1 2 3 4 5 6 7 8 9
155 } {
156 1 2 3b4b 5 6 7 8b 9b
157 } {
@@ -202,20 +202,20 @@
202 1 6 7 8 9
203 } {
204 1 2 3 4 9
205 } {
206 1 MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9
207 } -expectError
208 merge-test 25 {
209 1 2 3 4 5 6 7 8 9
210 } {
211 1 7 8 9
212 } {
213 1 2 3 9
214 } {
215 1 MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9
216 } -expectError
217
218 merge-test 30 {
219 1 2 3 4 5 6 7 8 9
220 } {
221 1 2 3 4 5 6 7 9
@@ -257,20 +257,20 @@
257 1 2 3 4 9
258 } {
259 1 6 7 8 9
260 } {
261 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END 9
262 } -expectError
263 merge-test 35 {
264 1 2 3 4 5 6 7 8 9
265 } {
266 1 2 3 9
267 } {
268 1 7 8 9
269 } {
270 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END 9
271 } -expectError
272
273 merge-test 40 {
274 2 3 4 5 6 7 8
275 } {
276 3 4 5 6 7 8
@@ -312,20 +312,20 @@
312 6 7 8
313 } {
314 2 3 4
315 } {
316 MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END
317 } -expectError
318 merge-test 45 {
319 2 3 4 5 6 7 8
320 } {
321 7 8
322 } {
323 2 3
324 } {
325 MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END
326 } -expectError
327
328 merge-test 50 {
329 2 3 4 5 6 7 8
330 } {
331 2 3 4 5 6 7
@@ -366,20 +366,20 @@
366 2 3 4
367 } {
368 6 7 8
369 } {
370 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END
371 } -expectError
372 merge-test 55 {
373 2 3 4 5 6 7 8
374 } {
375 2 3
376 } {
377 7 8
378 } {
379 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END
380 } -expectError
381
382 merge-test 60 {
383 1 2 3 4 5 6 7 8 9
384 } {
385 1 2b 3 4 5 6 7 8 9
@@ -421,20 +421,20 @@
421 1 2b 3b 4b 5b 6 7 8 9
422 } {
423 1 2 3 4 9
424 } {
425 1 MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9
426 } -expectError
427 merge-test 65 {
428 1 2 3 4 5 6 7 8 9
429 } {
430 1 2b 3b 4b 5b 6b 7 8 9
431 } {
432 1 2 3 9
433 } {
434 1 MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9
435 } -expectError
436
437 merge-test 70 {
438 1 2 3 4 5 6 7 8 9
439 } {
440 1 2 3 4 5 6 7 9
@@ -476,20 +476,20 @@
476 1 2 3 4 9
477 } {
478 1 2b 3b 4b 5b 6 7 8 9
479 } {
480 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END 9
481 } -expectError
482 merge-test 75 {
483 1 2 3 4 5 6 7 8 9
484 } {
485 1 2 3 9
486 } {
487 1 2b 3b 4b 5b 6b 7 8 9
488 } {
489 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END 9
490 } -expectError
491
492 merge-test 80 {
493 2 3 4 5 6 7 8
494 } {
495 2b 3 4 5 6 7 8
@@ -531,20 +531,20 @@
531 2b 3b 4b 5b 6 7 8
532 } {
533 2 3 4
534 } {
535 MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END
536 } -expectError
537 merge-test 85 {
538 2 3 4 5 6 7 8
539 } {
540 2b 3b 4b 5b 6b 7 8
541 } {
542 2 3
543 } {
544 MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END
545 } -expectError
546
547 merge-test 90 {
548 2 3 4 5 6 7 8
549 } {
550 2 3 4 5 6 7
@@ -586,20 +586,20 @@
586 2 3 4
587 } {
588 2b 3b 4b 5b 6 7 8
589 } {
590 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END
591 } -expectError
592 merge-test 95 {
593 2 3 4 5 6 7 8
594 } {
595 2 3
596 } {
597 2b 3b 4b 5b 6b 7 8
598 } {
599 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END
600 } -expectError
601
602 merge-test 100 {
603 1 2 3 4 5 6 7 8 9
604 } {
605 1 2b 3 4 5 7 8 9 a b c d e
@@ -632,19 +632,19 @@
632 1 2 3 4 5 7 8 9b
633 } {
634 1 2 3 4 5 7 8 9b a b c d e
635 } {
636 1 2 3 4 5 7 8 MINE: 9b COM: 9 YOURS: 9b a b c d e END
637 } -expectError
638 merge-test 104 {
639 1 2 3 4 5 6 7 8 9
640 } {
641 1 2 3 4 5 7 8 9b a b c d e
642 } {
643 1 2 3 4 5 7 8 9b
644 } {
645 1 2 3 4 5 7 8 MINE: 9b a b c d e COM: 9 YOURS: 9b END
646 } -expectError
647
648 ###############################################################################
649
650 test_cleanup
651
--- test/merge4.test
+++ test/merge4.test
@@ -18,16 +18,16 @@
1818
# Tests of the 3-way merge
1919
#
2020
2121
test_setup ""
2222
23
-proc merge-test {testid basis v1 v2 result1 result2} {
23
+proc merge-test {testid basis v1 v2 result1 result2 {fossil_args ""}} {
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
27
- fossil 3-way-merge t1 t2 t3 t4
28
- fossil 3-way-merge t1 t3 t2 t5
27
+ fossil 3-way-merge t1 t2 t3 t4 {*}$fossil_args
28
+ fossil 3-way-merge t1 t3 t2 t5 {*}$fossil_args
2929
set x [read_file t4]
3030
regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<< \(line \d+\)} $x {>} x
3131
regsub -all {\|\|\|\|\|\|\|.*======= \(line \d+\)} $x {=} x
3232
regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x
3333
set x [split [string trim $x] \n]
@@ -61,11 +61,11 @@
6161
1 2 3 4c 5c 6c 7 8 9
6262
} {
6363
1 > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < 9
6464
} {
6565
1 > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < 9
66
-}
66
+} -expectError
6767
merge-test 1001 {
6868
1 2 3 4 5 6 7 8 9
6969
} {
7070
1 2b 3b 4 5 6 7b 8b 9
7171
} {
@@ -83,11 +83,11 @@
8383
2 3 4c 5c 6c 7 8
8484
} {
8585
> 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 <
8686
} {
8787
> 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b <
88
-}
88
+} -expectError
8989
merge-test 1003 {
9090
2 3 4 5 6 7 8
9191
} {
9292
2b 3b 4 5 6 7b 8b
9393
} {
9494
--- test/merge4.test
+++ test/merge4.test
@@ -18,16 +18,16 @@
18 # Tests of the 3-way merge
19 #
20
21 test_setup ""
22
23 proc merge-test {testid basis v1 v2 result1 result2} {
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 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]
@@ -61,11 +61,11 @@
61 1 2 3 4c 5c 6c 7 8 9
62 } {
63 1 > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < 9
64 } {
65 1 > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < 9
66 }
67 merge-test 1001 {
68 1 2 3 4 5 6 7 8 9
69 } {
70 1 2b 3b 4 5 6 7b 8b 9
71 } {
@@ -83,11 +83,11 @@
83 2 3 4c 5c 6c 7 8
84 } {
85 > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 <
86 } {
87 > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b <
88 }
89 merge-test 1003 {
90 2 3 4 5 6 7 8
91 } {
92 2b 3b 4 5 6 7b 8b
93 } {
94
--- test/merge4.test
+++ test/merge4.test
@@ -18,16 +18,16 @@
18 # Tests of the 3-way merge
19 #
20
21 test_setup ""
22
23 proc merge-test {testid basis v1 v2 result1 result2 {fossil_args ""}} {
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 {*}$fossil_args
28 fossil 3-way-merge t1 t3 t2 t5 {*}$fossil_args
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]
@@ -61,11 +61,11 @@
61 1 2 3 4c 5c 6c 7 8 9
62 } {
63 1 > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < 9
64 } {
65 1 > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < 9
66 } -expectError
67 merge-test 1001 {
68 1 2 3 4 5 6 7 8 9
69 } {
70 1 2b 3b 4 5 6 7b 8b 9
71 } {
@@ -83,11 +83,11 @@
83 2 3 4c 5c 6c 7 8
84 } {
85 > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 <
86 } {
87 > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b <
88 } -expectError
89 merge-test 1003 {
90 2 3 4 5 6 7 8
91 } {
92 2b 3b 4 5 6 7b 8b
93 } {
94
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -262,19 +262,19 @@
262262
fossil add f1
263263
fossil commit -b b2 -m "add f1"
264264
265265
fossil update trunk
266266
fossil merge b1
267
-fossil merge b2
267
+fossil merge b2 -expectError
268268
test_status_list merge_renames-8-1 $RESULT {
269269
MERGE f1
270270
WARNING: 1 merge conflicts
271271
}
272272
273273
fossil revert
274274
fossil merge --integrate b1
275
-fossil merge b2
275
+fossil merge b2 -expectError
276276
test_status_list merge_renames-8-2 $RESULT {
277277
MERGE f1
278278
WARNING: 1 merge conflicts
279279
}
280280
@@ -322,11 +322,11 @@
322322
fossil undo
323323
test_status_list merge_renames-9-5 $RESULT {
324324
UNDO f1
325325
UNDO f2
326326
}
327
-fossil merge -n b
327
+fossil merge -n b -expectError
328328
test_status_list merge_renames-9-6 $RESULT "
329329
$expectedMerge
330330
REMINDER: this was a dry run - no files were actually changed.
331331
"
332332
test merge_renames-9-7 {[fossil changes] eq ""}
333333
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -262,19 +262,19 @@
262 fossil add f1
263 fossil commit -b b2 -m "add f1"
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
@@ -322,11 +322,11 @@
322 fossil undo
323 test_status_list merge_renames-9-5 $RESULT {
324 UNDO f1
325 UNDO f2
326 }
327 fossil merge -n b
328 test_status_list merge_renames-9-6 $RESULT "
329 $expectedMerge
330 REMINDER: this was a dry run - no files were actually changed.
331 "
332 test merge_renames-9-7 {[fossil changes] eq ""}
333
--- test/merge_renames.test
+++ test/merge_renames.test
@@ -262,19 +262,19 @@
262 fossil add f1
263 fossil commit -b b2 -m "add f1"
264
265 fossil update trunk
266 fossil merge b1
267 fossil merge b2 -expectError
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 -expectError
276 test_status_list merge_renames-8-2 $RESULT {
277 MERGE f1
278 WARNING: 1 merge conflicts
279 }
280
@@ -322,11 +322,11 @@
322 fossil undo
323 test_status_list merge_renames-9-5 $RESULT {
324 UNDO f1
325 UNDO f2
326 }
327 fossil merge -n b -expectError
328 test_status_list merge_renames-9-6 $RESULT "
329 $expectedMerge
330 REMINDER: this was a dry run - no files were actually changed.
331 "
332 test merge_renames-9-7 {[fossil changes] eq ""}
333
--- test/merge_warn.test
+++ test/merge_warn.test
@@ -40,11 +40,11 @@
4040
fossil commit -m "add f4"
4141
4242
fossil update trunk
4343
write_file f1 "f1.1"
4444
write_file f3 "f3.1"
45
-fossil merge --integrate mrg
45
+fossil merge --integrate mrg -expectError
4646
test_status_list merge_warn-1 $RESULT {
4747
WARNING: 1 unmanaged files were overwritten
4848
WARNING: 2 merge conflicts
4949
DELETE f1
5050
MERGE f2
5151
--- test/merge_warn.test
+++ test/merge_warn.test
@@ -40,11 +40,11 @@
40 fossil commit -m "add f4"
41
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
--- test/merge_warn.test
+++ test/merge_warn.test
@@ -40,11 +40,11 @@
40 fossil commit -m "add f4"
41
42 fossil update trunk
43 write_file f1 "f1.1"
44 write_file f3 "f3.1"
45 fossil merge --integrate mrg -expectError
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
--- test/settings-repo.test
+++ test/settings-repo.test
@@ -40,11 +40,15 @@
4040
foreach name $all_settings {
4141
#
4242
# HACK: Make 100% sure that there are no non-default setting values
4343
# present anywhere.
4444
#
45
- fossil unset $name --exact --global
45
+ if {$name eq "manifest"} {
46
+ fossil unset $name --exact --global -expectError
47
+ } else {
48
+ fossil unset $name --exact --global
49
+ }
4650
fossil unset $name --exact
4751
4852
#
4953
# NOTE: Query for the hard-coded default value of this setting and
5054
# save it.
@@ -53,62 +57,62 @@
5357
set defaults($name) [normalize_result]
5458
}
5559
5660
###############################################################################
5761
58
-fossil settings bad-setting some_value
62
+fossil settings bad-setting some_value -expectError
5963
6064
test settings-set-bad-local {
6165
[normalize_result] eq "no such setting: bad-setting"
6266
}
6367
64
-fossil settings bad-setting some_value --global
68
+fossil settings bad-setting some_value --global -expectError
6569
6670
test settings-set-bad-global {
6771
[normalize_result] eq "no such setting: bad-setting"
6872
}
6973
7074
###############################################################################
7175
72
-fossil unset bad-setting
76
+fossil unset bad-setting -expectError
7377
7478
test settings-unset-bad-local {
7579
[normalize_result] eq "no such setting: bad-setting"
7680
}
7781
78
-fossil unset bad-setting --global
82
+fossil unset bad-setting --global -expectError
7983
8084
test settings-unset-bad-global {
8185
[normalize_result] eq "no such setting: bad-setting"
8286
}
8387
8488
###############################################################################
8589
86
-fossil settings ssl some_value
90
+fossil settings ssl some_value -expectError
8791
8892
test settings-set-ambiguous-local {
8993
[normalize_result] eq
9094
"ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
9195
}
9296
93
-fossil settings ssl some_value --global
97
+fossil settings ssl some_value --global -expectError
9498
9599
test settings-set-ambiguous-global {
96100
[normalize_result] eq
97101
"ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
98102
}
99103
100104
###############################################################################
101105
102
-fossil unset ssl
106
+fossil unset ssl -expectError
103107
104108
test settings-unset-ambiguous-local {
105109
[normalize_result] eq
106110
"ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
107111
}
108112
109
-fossil unset ssl --global
113
+fossil unset ssl --global -expectError
110114
111115
test settings-unset-ambiguous-global {
112116
[normalize_result] eq
113117
"ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
114118
}
115119
--- test/settings-repo.test
+++ test/settings-repo.test
@@ -40,11 +40,15 @@
40 foreach name $all_settings {
41 #
42 # HACK: Make 100% sure that there are no non-default setting values
43 # present anywhere.
44 #
45 fossil unset $name --exact --global
 
 
 
 
46 fossil unset $name --exact
47
48 #
49 # NOTE: Query for the hard-coded default value of this setting and
50 # save it.
@@ -53,62 +57,62 @@
53 set defaults($name) [normalize_result]
54 }
55
56 ###############################################################################
57
58 fossil settings bad-setting some_value
59
60 test settings-set-bad-local {
61 [normalize_result] eq "no such setting: bad-setting"
62 }
63
64 fossil settings bad-setting some_value --global
65
66 test settings-set-bad-global {
67 [normalize_result] eq "no such setting: bad-setting"
68 }
69
70 ###############################################################################
71
72 fossil unset bad-setting
73
74 test settings-unset-bad-local {
75 [normalize_result] eq "no such setting: bad-setting"
76 }
77
78 fossil unset bad-setting --global
79
80 test settings-unset-bad-global {
81 [normalize_result] eq "no such setting: bad-setting"
82 }
83
84 ###############################################################################
85
86 fossil settings ssl some_value
87
88 test settings-set-ambiguous-local {
89 [normalize_result] eq
90 "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
91 }
92
93 fossil settings ssl some_value --global
94
95 test settings-set-ambiguous-global {
96 [normalize_result] eq
97 "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
98 }
99
100 ###############################################################################
101
102 fossil unset ssl
103
104 test settings-unset-ambiguous-local {
105 [normalize_result] eq
106 "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
107 }
108
109 fossil unset ssl --global
110
111 test settings-unset-ambiguous-global {
112 [normalize_result] eq
113 "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
114 }
115
--- test/settings-repo.test
+++ test/settings-repo.test
@@ -40,11 +40,15 @@
40 foreach name $all_settings {
41 #
42 # HACK: Make 100% sure that there are no non-default setting values
43 # present anywhere.
44 #
45 if {$name eq "manifest"} {
46 fossil unset $name --exact --global -expectError
47 } else {
48 fossil unset $name --exact --global
49 }
50 fossil unset $name --exact
51
52 #
53 # NOTE: Query for the hard-coded default value of this setting and
54 # save it.
@@ -53,62 +57,62 @@
57 set defaults($name) [normalize_result]
58 }
59
60 ###############################################################################
61
62 fossil settings bad-setting some_value -expectError
63
64 test settings-set-bad-local {
65 [normalize_result] eq "no such setting: bad-setting"
66 }
67
68 fossil settings bad-setting some_value --global -expectError
69
70 test settings-set-bad-global {
71 [normalize_result] eq "no such setting: bad-setting"
72 }
73
74 ###############################################################################
75
76 fossil unset bad-setting -expectError
77
78 test settings-unset-bad-local {
79 [normalize_result] eq "no such setting: bad-setting"
80 }
81
82 fossil unset bad-setting --global -expectError
83
84 test settings-unset-bad-global {
85 [normalize_result] eq "no such setting: bad-setting"
86 }
87
88 ###############################################################################
89
90 fossil settings ssl some_value -expectError
91
92 test settings-set-ambiguous-local {
93 [normalize_result] eq
94 "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
95 }
96
97 fossil settings ssl some_value --global -expectError
98
99 test settings-set-ambiguous-global {
100 [normalize_result] eq
101 "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
102 }
103
104 ###############################################################################
105
106 fossil unset ssl -expectError
107
108 test settings-unset-ambiguous-local {
109 [normalize_result] eq
110 "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
111 }
112
113 fossil unset ssl --global -expectError
114
115 test settings-unset-ambiguous-global {
116 [normalize_result] eq
117 "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity"
118 }
119
--- test/settings.test
+++ test/settings.test
@@ -92,11 +92,15 @@
9292
test settings-query-local-$name {
9393
[regexp -- [string map [list %name% $name] $pattern(1)] $data] ||
9494
[regexp -- [string map [list %name% $name] $pattern(2)] $data]
9595
}
9696
97
- fossil settings $name --exact --global
97
+ if {$name eq "manifest"} {
98
+ fossil settings $name --exact --global -expectError
99
+ } else {
100
+ fossil settings $name --exact --global
101
+ }
98102
set data [normalize_result]
99103
100104
if {$name eq "manifest"} {
101105
test settings-query-global-$name {
102106
$data eq "cannot set 'manifest' globally"
@@ -109,20 +113,20 @@
109113
}
110114
}
111115
112116
###############################################################################
113117
114
-fossil settings bad-setting
118
+fossil settings bad-setting -expectError
115119
116120
test settings-query-bad-local {
117121
[normalize_result] eq "no such setting: bad-setting"
118122
}
119123
120
-fossil settings bad-setting --global
124
+fossil settings bad-setting --global -expectError
121125
122126
test settings-query-bad-global {
123127
[normalize_result] eq "no such setting: bad-setting"
124128
}
125129
126130
###############################################################################
127131
128132
test_cleanup
129133
--- test/settings.test
+++ test/settings.test
@@ -92,11 +92,15 @@
92 test settings-query-local-$name {
93 [regexp -- [string map [list %name% $name] $pattern(1)] $data] ||
94 [regexp -- [string map [list %name% $name] $pattern(2)] $data]
95 }
96
97 fossil settings $name --exact --global
 
 
 
 
98 set data [normalize_result]
99
100 if {$name eq "manifest"} {
101 test settings-query-global-$name {
102 $data eq "cannot set 'manifest' globally"
@@ -109,20 +113,20 @@
109 }
110 }
111
112 ###############################################################################
113
114 fossil settings bad-setting
115
116 test settings-query-bad-local {
117 [normalize_result] eq "no such setting: bad-setting"
118 }
119
120 fossil settings bad-setting --global
121
122 test settings-query-bad-global {
123 [normalize_result] eq "no such setting: bad-setting"
124 }
125
126 ###############################################################################
127
128 test_cleanup
129
--- test/settings.test
+++ test/settings.test
@@ -92,11 +92,15 @@
92 test settings-query-local-$name {
93 [regexp -- [string map [list %name% $name] $pattern(1)] $data] ||
94 [regexp -- [string map [list %name% $name] $pattern(2)] $data]
95 }
96
97 if {$name eq "manifest"} {
98 fossil settings $name --exact --global -expectError
99 } else {
100 fossil settings $name --exact --global
101 }
102 set data [normalize_result]
103
104 if {$name eq "manifest"} {
105 test settings-query-global-$name {
106 $data eq "cannot set 'manifest' globally"
@@ -109,20 +113,20 @@
113 }
114 }
115
116 ###############################################################################
117
118 fossil settings bad-setting -expectError
119
120 test settings-query-bad-local {
121 [normalize_result] eq "no such setting: bad-setting"
122 }
123
124 fossil settings bad-setting --global -expectError
125
126 test settings-query-bad-global {
127 [normalize_result] eq "no such setting: bad-setting"
128 }
129
130 ###############################################################################
131
132 test_cleanup
133
+1 -1
--- test/stash.test
+++ test/stash.test
@@ -206,11 +206,11 @@
206206
# fossil: ./src/delta.c:231: checksum: Assertion '...' failed.
207207
# Should be triggered by this stash-WY-1 test.
208208
fossil checkout --force c1
209209
fossil clean
210210
fossil mv --soft f1 f1new
211
-stash-test WY-1 {save -m "Reported 2016-02-09"} {
211
+stash-test WY-1 {-expectError save -m "Reported 2016-02-09"} {
212212
REVERT f1
213213
DELETE f1new
214214
} -changes {
215215
} -addremove {
216216
} -exists {f1 f2 f3} -notexists {f1new} -knownbugs {-code -result}
217217
--- test/stash.test
+++ test/stash.test
@@ -206,11 +206,11 @@
206 # fossil: ./src/delta.c:231: checksum: Assertion '...' failed.
207 # Should be triggered by this stash-WY-1 test.
208 fossil checkout --force c1
209 fossil clean
210 fossil mv --soft f1 f1new
211 stash-test WY-1 {save -m "Reported 2016-02-09"} {
212 REVERT f1
213 DELETE f1new
214 } -changes {
215 } -addremove {
216 } -exists {f1 f2 f3} -notexists {f1new} -knownbugs {-code -result}
217
--- test/stash.test
+++ test/stash.test
@@ -206,11 +206,11 @@
206 # fossil: ./src/delta.c:231: checksum: Assertion '...' failed.
207 # Should be triggered by this stash-WY-1 test.
208 fossil checkout --force c1
209 fossil clean
210 fossil mv --soft f1 f1new
211 stash-test WY-1 {-expectError save -m "Reported 2016-02-09"} {
212 REVERT f1
213 DELETE f1new
214 } -changes {
215 } -addremove {
216 } -exists {f1 f2 f3} -notexists {f1new} -knownbugs {-code -result}
217
--- test/symlinks.test
+++ test/symlinks.test
@@ -61,11 +61,11 @@
6161
6262
fossil add [file join $rootDir symdirA f1.txt]
6363
test symlinks-skip-dir-traversal {[normalize_result] eq \
6464
"SKIP symdirA/f1.txt"}
6565
66
-fossil commit -m "c1"
66
+fossil commit -m "c1" -expectError
6767
6868
test symlinks-empty-commit {[normalize_result] eq \
6969
"nothing has changed; use --allow-empty to override"}
7070
7171
###############################################################################
7272
--- test/symlinks.test
+++ test/symlinks.test
@@ -61,11 +61,11 @@
61
62 fossil add [file join $rootDir symdirA f1.txt]
63 test symlinks-skip-dir-traversal {[normalize_result] eq \
64 "SKIP symdirA/f1.txt"}
65
66 fossil commit -m "c1"
67
68 test symlinks-empty-commit {[normalize_result] eq \
69 "nothing has changed; use --allow-empty to override"}
70
71 ###############################################################################
72
--- test/symlinks.test
+++ test/symlinks.test
@@ -61,11 +61,11 @@
61
62 fossil add [file join $rootDir symdirA f1.txt]
63 test symlinks-skip-dir-traversal {[normalize_result] eq \
64 "SKIP symdirA/f1.txt"}
65
66 fossil commit -m "c1" -expectError
67
68 test symlinks-empty-commit {[normalize_result] eq \
69 "nothing has changed; use --allow-empty to override"}
70
71 ###############################################################################
72
+1 -1
--- test/tester.tcl
+++ test/tester.tcl
@@ -1019,11 +1019,11 @@
10191019
set data [subst [read_file $dataFileName]]
10201020
10211021
write_file $inFileName $data
10221022
10231023
fossil http --in $inFileName --out $outFileName --ipaddr 127.0.0.1 \
1024
- $repository --localauth --th-trace
1024
+ $repository --localauth --th-trace -expectError
10251025
10261026
set result [expr {[file exists $outFileName] ? [read_file $outFileName] : ""}]
10271027
10281028
if {1} {
10291029
catch {file delete $inFileName}
10301030
--- test/tester.tcl
+++ test/tester.tcl
@@ -1019,11 +1019,11 @@
1019 set data [subst [read_file $dataFileName]]
1020
1021 write_file $inFileName $data
1022
1023 fossil http --in $inFileName --out $outFileName --ipaddr 127.0.0.1 \
1024 $repository --localauth --th-trace
1025
1026 set result [expr {[file exists $outFileName] ? [read_file $outFileName] : ""}]
1027
1028 if {1} {
1029 catch {file delete $inFileName}
1030
--- test/tester.tcl
+++ test/tester.tcl
@@ -1019,11 +1019,11 @@
1019 set data [subst [read_file $dataFileName]]
1020
1021 write_file $inFileName $data
1022
1023 fossil http --in $inFileName --out $outFileName --ipaddr 127.0.0.1 \
1024 $repository --localauth --th-trace -expectError
1025
1026 set result [expr {[file exists $outFileName] ? [read_file $outFileName] : ""}]
1027
1028 if {1} {
1029 catch {file delete $inFileName}
1030
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -146,11 +146,11 @@
146146
+++ some stuff here +++
147147
<h1><b>command_hook timeline command_notify timeline</b></h1>}}
148148
149149
###############################################################################
150150
151
-fossil timeline custom3; # NOTE: Bad "WHEN" argument.
151
+fossil timeline custom3 -expectError; # NOTE: Bad "WHEN" argument.
152152
153153
test th1-cmd-hooks-1c {[normalize_result] eq \
154154
{<h1><b>command_hook timeline</b></h1>
155155
unknown check-in or invalid date: custom3}}
156156
@@ -196,11 +196,11 @@
196196
test th1-custom-cmd-3a {[string trim $RESULT] eq \
197197
{<h1><b>command_hook test3</b></h1>}}
198198
199199
###############################################################################
200200
201
-fossil test4
201
+fossil test4 -expectError
202202
203203
test th1-custom-cmd-4a {[first_data_line] eq \
204204
{<h1><b>command_hook test4</b></h1>}}
205205
206206
test th1-custom-cmd-4b {[regexp -- \
207207
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -146,11 +146,11 @@
146 +++ some stuff here +++
147 <h1><b>command_hook timeline command_notify timeline</b></h1>}}
148
149 ###############################################################################
150
151 fossil timeline custom3; # NOTE: Bad "WHEN" argument.
152
153 test th1-cmd-hooks-1c {[normalize_result] eq \
154 {<h1><b>command_hook timeline</b></h1>
155 unknown check-in or invalid date: custom3}}
156
@@ -196,11 +196,11 @@
196 test th1-custom-cmd-3a {[string trim $RESULT] eq \
197 {<h1><b>command_hook test3</b></h1>}}
198
199 ###############################################################################
200
201 fossil test4
202
203 test th1-custom-cmd-4a {[first_data_line] eq \
204 {<h1><b>command_hook test4</b></h1>}}
205
206 test th1-custom-cmd-4b {[regexp -- \
207
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -146,11 +146,11 @@
146 +++ some stuff here +++
147 <h1><b>command_hook timeline command_notify timeline</b></h1>}}
148
149 ###############################################################################
150
151 fossil timeline custom3 -expectError; # NOTE: Bad "WHEN" argument.
152
153 test th1-cmd-hooks-1c {[normalize_result] eq \
154 {<h1><b>command_hook timeline</b></h1>
155 unknown check-in or invalid date: custom3}}
156
@@ -196,11 +196,11 @@
196 test th1-custom-cmd-3a {[string trim $RESULT] eq \
197 {<h1><b>command_hook test3</b></h1>}}
198
199 ###############################################################################
200
201 fossil test4 -expectError
202
203 test th1-custom-cmd-4a {[first_data_line] eq \
204 {<h1><b>command_hook test4</b></h1>}}
205
206 test th1-custom-cmd-4b {[regexp -- \
207
+2 -2
--- test/th1.test
+++ test/th1.test
@@ -730,11 +730,11 @@
730730
fossil test-th-eval "trace {}"
731731
test th1-trace-1 {$RESULT eq {}}
732732
733733
###############################################################################
734734
735
-fossil test-th-eval --th-trace "trace {}"
735
+fossil test-th-eval --th-trace "trace {}" -expectError
736736
set normalized_result [normalize_result]
737737
738738
regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \
739739
$normalized_result {} normalized_result
740740
@@ -758,11 +758,11 @@
758758
fossil test-th-eval "trace {this is a trace message.}"
759759
test th1-trace-3 {$RESULT eq {}}
760760
761761
###############################################################################
762762
763
-fossil test-th-eval --th-trace "trace {this is a trace message.}"
763
+fossil test-th-eval --th-trace "trace {this is a trace message.}" -expectError
764764
set normalized_result [normalize_result]
765765
766766
regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \
767767
$normalized_result {} normalized_result
768768
769769
--- test/th1.test
+++ test/th1.test
@@ -730,11 +730,11 @@
730 fossil test-th-eval "trace {}"
731 test th1-trace-1 {$RESULT eq {}}
732
733 ###############################################################################
734
735 fossil test-th-eval --th-trace "trace {}"
736 set normalized_result [normalize_result]
737
738 regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \
739 $normalized_result {} normalized_result
740
@@ -758,11 +758,11 @@
758 fossil test-th-eval "trace {this is a trace message.}"
759 test th1-trace-3 {$RESULT eq {}}
760
761 ###############################################################################
762
763 fossil test-th-eval --th-trace "trace {this is a trace message.}"
764 set normalized_result [normalize_result]
765
766 regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \
767 $normalized_result {} normalized_result
768
769
--- test/th1.test
+++ test/th1.test
@@ -730,11 +730,11 @@
730 fossil test-th-eval "trace {}"
731 test th1-trace-1 {$RESULT eq {}}
732
733 ###############################################################################
734
735 fossil test-th-eval --th-trace "trace {}" -expectError
736 set normalized_result [normalize_result]
737
738 regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \
739 $normalized_result {} normalized_result
740
@@ -758,11 +758,11 @@
758 fossil test-th-eval "trace {this is a trace message.}"
759 test th1-trace-3 {$RESULT eq {}}
760
761 ###############################################################################
762
763 fossil test-th-eval --th-trace "trace {this is a trace message.}" -expectError
764 set normalized_result [normalize_result]
765
766 regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \
767 $normalized_result {} normalized_result
768
769
--- test/unversioned.test
+++ test/unversioned.test
@@ -56,11 +56,11 @@
5656
set fossilexeref [string range $fossilexe 0 end-4]
5757
} else {
5858
set fossilexeref $fossilexe
5959
}
6060
61
-fossil unversioned
61
+fossil unversioned -expectError
6262
test unversioned-1 {[normalize_result] eq \
6363
[string map [list %fossil% [file nativename $fossilexeref]] {Usage: %fossil%\
6464
unversioned add|cat|edit|export|list|revert|remove|sync|touch}]}
6565
6666
###############################################################################
6767
--- test/unversioned.test
+++ test/unversioned.test
@@ -56,11 +56,11 @@
56 set fossilexeref [string range $fossilexe 0 end-4]
57 } else {
58 set fossilexeref $fossilexe
59 }
60
61 fossil unversioned
62 test unversioned-1 {[normalize_result] eq \
63 [string map [list %fossil% [file nativename $fossilexeref]] {Usage: %fossil%\
64 unversioned add|cat|edit|export|list|revert|remove|sync|touch}]}
65
66 ###############################################################################
67
--- test/unversioned.test
+++ test/unversioned.test
@@ -56,11 +56,11 @@
56 set fossilexeref [string range $fossilexe 0 end-4]
57 } else {
58 set fossilexeref $fossilexe
59 }
60
61 fossil unversioned -expectError
62 test unversioned-1 {[normalize_result] eq \
63 [string map [list %fossil% [file nativename $fossilexeref]] {Usage: %fossil%\
64 unversioned add|cat|edit|export|list|revert|remove|sync|touch}]}
65
66 ###############################################################################
67
--- test/update.test
+++ test/update.test
@@ -30,12 +30,12 @@
3030
return [format "test-%02u-%s.txt" $UPDATE_TEST $desc]
3131
}
3232
3333
# The output is in file name order, so massage $RESULT to remove initial UNCHANGED
3434
# files. Only do this if we have the expected branch information.
35
-proc test_update {testname warning} {
36
- fossil update --verbose
35
+proc test_update {testname warning {fossil_args ""}} {
36
+ fossil update --verbose {*}$fossil_args
3737
if { [regsub {\n-{79}\nupdated-from: [0-9a-z]{40} .*} $::RESULT {} test_result ] } {
3838
regsub {^(?:UNCHANGED [-a-z0-9.]+\n)*} $test_result {} test_result
3939
} else {
4040
set test_result $::RESULT
4141
}
@@ -79,21 +79,21 @@
7979
fossil add $fname
8080
fossil commit -m "Add $fname"
8181
fossil up previous
8282
write_seq_to_file $fname
8383
fossil add $fname
84
-test_update $testname $warning
84
+test_update $testname $warning -expectError
8585
8686
set testname "add-overwrites"
8787
set fname [test_update_setup $testname]
8888
set warning "ADD $fname - overwrites an unmanaged file, original copy backed up locally"
8989
write_seq_to_file $fname
9090
fossil add $fname
9191
fossil commit -m "Add $fname"
9292
fossil up previous
9393
write_seq_to_file $fname
94
-test_update $testname $warning
94
+test_update $testname $warning -expectError
9595
9696
set testname "add-standard"
9797
set fname [test_update_setup $testname]
9898
set warning "ADD $fname"
9999
write_seq_to_file $fname
@@ -145,11 +145,11 @@
145145
fossil commit -m "Add $fname"
146146
fossil rm --hard $fname
147147
fossil commit -m "Remove $fname"
148148
fossil up previous
149149
file delete $fname
150
-test_update $testname $warning
150
+test_update $testname $warning -expectError
151151
152152
set testname "remove"
153153
set fname [test_update_setup $testname]
154154
set warning "REMOVE $fname"
155155
write_seq_to_file $fname
@@ -195,11 +195,11 @@
195195
fossil commit -m "Add $fname"
196196
write_seq_to_file $fname
197197
fossil commit -m "Update $fname"
198198
fossil up previous
199199
write_seq_to_file $fname
200
-test_update $testname $warning
200
+test_update $testname $warning -expectError
201201
202202
# TODO: test for "Cannot merge binary file"?
203203
204204
set testname "edited"
205205
set fname [test_update_setup $testname]
206206
--- test/update.test
+++ test/update.test
@@ -30,12 +30,12 @@
30 return [format "test-%02u-%s.txt" $UPDATE_TEST $desc]
31 }
32
33 # The output is in file name order, so massage $RESULT to remove initial UNCHANGED
34 # files. Only do this if we have the expected branch information.
35 proc test_update {testname warning} {
36 fossil update --verbose
37 if { [regsub {\n-{79}\nupdated-from: [0-9a-z]{40} .*} $::RESULT {} test_result ] } {
38 regsub {^(?:UNCHANGED [-a-z0-9.]+\n)*} $test_result {} test_result
39 } else {
40 set test_result $::RESULT
41 }
@@ -79,21 +79,21 @@
79 fossil add $fname
80 fossil commit -m "Add $fname"
81 fossil up previous
82 write_seq_to_file $fname
83 fossil add $fname
84 test_update $testname $warning
85
86 set testname "add-overwrites"
87 set fname [test_update_setup $testname]
88 set warning "ADD $fname - overwrites an unmanaged file, original copy backed up locally"
89 write_seq_to_file $fname
90 fossil add $fname
91 fossil commit -m "Add $fname"
92 fossil up previous
93 write_seq_to_file $fname
94 test_update $testname $warning
95
96 set testname "add-standard"
97 set fname [test_update_setup $testname]
98 set warning "ADD $fname"
99 write_seq_to_file $fname
@@ -145,11 +145,11 @@
145 fossil commit -m "Add $fname"
146 fossil rm --hard $fname
147 fossil commit -m "Remove $fname"
148 fossil up previous
149 file delete $fname
150 test_update $testname $warning
151
152 set testname "remove"
153 set fname [test_update_setup $testname]
154 set warning "REMOVE $fname"
155 write_seq_to_file $fname
@@ -195,11 +195,11 @@
195 fossil commit -m "Add $fname"
196 write_seq_to_file $fname
197 fossil commit -m "Update $fname"
198 fossil up previous
199 write_seq_to_file $fname
200 test_update $testname $warning
201
202 # TODO: test for "Cannot merge binary file"?
203
204 set testname "edited"
205 set fname [test_update_setup $testname]
206
--- test/update.test
+++ test/update.test
@@ -30,12 +30,12 @@
30 return [format "test-%02u-%s.txt" $UPDATE_TEST $desc]
31 }
32
33 # The output is in file name order, so massage $RESULT to remove initial UNCHANGED
34 # files. Only do this if we have the expected branch information.
35 proc test_update {testname warning {fossil_args ""}} {
36 fossil update --verbose {*}$fossil_args
37 if { [regsub {\n-{79}\nupdated-from: [0-9a-z]{40} .*} $::RESULT {} test_result ] } {
38 regsub {^(?:UNCHANGED [-a-z0-9.]+\n)*} $test_result {} test_result
39 } else {
40 set test_result $::RESULT
41 }
@@ -79,21 +79,21 @@
79 fossil add $fname
80 fossil commit -m "Add $fname"
81 fossil up previous
82 write_seq_to_file $fname
83 fossil add $fname
84 test_update $testname $warning -expectError
85
86 set testname "add-overwrites"
87 set fname [test_update_setup $testname]
88 set warning "ADD $fname - overwrites an unmanaged file, original copy backed up locally"
89 write_seq_to_file $fname
90 fossil add $fname
91 fossil commit -m "Add $fname"
92 fossil up previous
93 write_seq_to_file $fname
94 test_update $testname $warning -expectError
95
96 set testname "add-standard"
97 set fname [test_update_setup $testname]
98 set warning "ADD $fname"
99 write_seq_to_file $fname
@@ -145,11 +145,11 @@
145 fossil commit -m "Add $fname"
146 fossil rm --hard $fname
147 fossil commit -m "Remove $fname"
148 fossil up previous
149 file delete $fname
150 test_update $testname $warning -expectError
151
152 set testname "remove"
153 set fname [test_update_setup $testname]
154 set warning "REMOVE $fname"
155 write_seq_to_file $fname
@@ -195,11 +195,11 @@
195 fossil commit -m "Add $fname"
196 write_seq_to_file $fname
197 fossil commit -m "Update $fname"
198 fossil up previous
199 write_seq_to_file $fname
200 test_update $testname $warning -expectError
201
202 # TODO: test for "Cannot merge binary file"?
203
204 set testname "edited"
205 set fname [test_update_setup $testname]
206

Keyboard Shortcuts

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