Fossil SCM
Test fixes for 2.24 as discussed in [forum:8d774bc3610fe8de|forum post 8d774bc3610fe8de].
Commit
271a978d908a58c1873d1cae503b4d884965d8fc828da6eb87d205bd61fd01e7
Parent
5e19daf9803d89e…
15 files changed
+3
-1
+1
-1
+24
-24
+12
-5
+4
-4
+9
-7
+4
-4
+3
-3
+1
-1
+4
-4
+17
-5
+27
+9
-9
+13
-11
+3
-3
~
test/amend.test
~
test/json.test
~
test/merge1.test
~
test/merge3.test
~
test/merge4.test
~
test/merge_renames.test
~
test/merge_warn.test
~
test/revert.test
~
test/settings-repo.test
~
test/stash.test
~
test/symlinks.test
~
test/tester.tcl
~
test/th1-tcl.test
~
test/th1.test
~
test/unversioned.test
+3
-1
| --- test/amend.test | ||
| +++ test/amend.test | ||
| @@ -306,13 +306,15 @@ | ||
| 306 | 306 | lappend tags -tag $tag |
| 307 | 307 | lappend cancels -cancel $tag |
| 308 | 308 | } |
| 309 | 309 | foreach res $result { |
| 310 | 310 | append t1exp ", $res" |
| 311 | - append t2exp "sym-$res*" | |
| 312 | 311 | append t3exp "Add*tag*\"$res\".*" |
| 313 | 312 | append t5exp "Cancel*tag*\"$res\".*" |
| 313 | + } | |
| 314 | + foreach res [lsort -nocase $result] { | |
| 315 | + append t2exp "sym-$res*" | |
| 314 | 316 | } |
| 315 | 317 | eval fossil amend $HASH $tags |
| 316 | 318 | test amend-tag-$tc.1 {[string match "*hash:*$HASH*tags:*$t1exp*" $RESULT]} |
| 317 | 319 | fossil tag ls --raw $HASH |
| 318 | 320 | test amend-tag-$tc.2 {[string match $t2exp $RESULT]} |
| 319 | 321 |
| --- 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 @@ | ||
| 276 | 276 | proc test_hascaps {testname need caps} { |
| 277 | 277 | foreach n [split $need {}] { |
| 278 | 278 | test $testname-$n {[string first $n $caps] >= 0} |
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | -test_hascaps json-login-c "hmnc" [dict get $AuthAnon capabilities] | |
| 281 | +test_hascaps json-login-c "hz" [dict get $AuthAnon capabilities] | |
| 282 | 282 | |
| 283 | 283 | fossil user new U1 User-1 Uone |
| 284 | 284 | fossil user capabilities U1 s |
| 285 | 285 | write_file u1 { |
| 286 | 286 | { |
| 287 | 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 "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 @@ | ||
| 73 | 73 | 333 - This is a test of the merging algohm - 3333 |
| 74 | 74 | 444 - If all goes well, we will be pleased - 4444 |
| 75 | 75 | 555 - we think it well and other stuff too - 5555 |
| 76 | 76 | } |
| 77 | 77 | write_file_indented t23 { |
| 78 | - <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<< | |
| 78 | + <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 1) | |
| 79 | 79 | 111 - This is line ONE of the demo program - 1111 |
| 80 | - ||||||| COMMON ANCESTOR content follows |||||||||||||||||||||||||||| | |
| 80 | + ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 1) | |
| 81 | 81 | 111 - This is line one of the demo program - 1111 |
| 82 | - ======= MERGED IN content follows ================================== | |
| 82 | + ======= MERGED IN content follows =============================== (line 1) | |
| 83 | 83 | 111 - This is line one OF the demo program - 1111 |
| 84 | - >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 84 | + >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 85 | 85 | 222 - The second line program line in code - 2222 |
| 86 | 86 | 333 - This is a test of the merging algohm - 3333 |
| 87 | 87 | 444 - If all goes well, we will be pleased - 4444 |
| 88 | 88 | 555 - we think it well and other stuff too - 5555 |
| 89 | 89 | } |
| 90 | 90 | write_file_indented t32 { |
| 91 | - <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<< | |
| 91 | + <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 1) | |
| 92 | 92 | 111 - This is line one OF the demo program - 1111 |
| 93 | - ||||||| COMMON ANCESTOR content follows |||||||||||||||||||||||||||| | |
| 93 | + ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 1) | |
| 94 | 94 | 111 - This is line one of the demo program - 1111 |
| 95 | - ======= MERGED IN content follows ================================== | |
| 95 | + ======= MERGED IN content follows =============================== (line 1) | |
| 96 | 96 | 111 - This is line ONE of the demo program - 1111 |
| 97 | - >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 97 | + >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 98 | 98 | 222 - The second line program line in code - 2222 |
| 99 | 99 | 333 - This is a test of the merging algohm - 3333 |
| 100 | 100 | 444 - If all goes well, we will be pleased - 4444 |
| 101 | 101 | 555 - we think it well and other stuff too - 5555 |
| 102 | 102 | } |
| @@ -158,30 +158,30 @@ | ||
| 158 | 158 | 333 - This is a test of the merging algohm - 3333 |
| 159 | 159 | 444 - If all goes well, we will be pleased - 4444 |
| 160 | 160 | 555 - we think it well and other stuff too - 5555 |
| 161 | 161 | } |
| 162 | 162 | 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) | |
| 165 | 165 | 111 - This is line one of the demo program - 1111 |
| 166 | - ======= MERGED IN content follows ================================== | |
| 166 | + ======= MERGED IN content follows =============================== (line 1) | |
| 167 | 167 | 000 - Zero lines added to the beginning of - 0000 |
| 168 | 168 | 111 - This is line one of the demo program - 1111 |
| 169 | - >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 169 | + >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 170 | 170 | 222 - The second line program line in code - 2222 |
| 171 | 171 | 333 - This is a test of the merging algohm - 3333 |
| 172 | 172 | 444 - If all goes well, we will be pleased - 4444 |
| 173 | 173 | 555 - we think it well and other stuff too - 5555 |
| 174 | 174 | } |
| 175 | 175 | write_file_indented t23 { |
| 176 | - <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<< | |
| 176 | + <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 1) | |
| 177 | 177 | 000 - Zero lines added to the beginning of - 0000 |
| 178 | 178 | 111 - This is line one of the demo program - 1111 |
| 179 | - ||||||| COMMON ANCESTOR content follows |||||||||||||||||||||||||||| | |
| 179 | + ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 1) | |
| 180 | 180 | 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 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 183 | 183 | 222 - The second line program line in code - 2222 |
| 184 | 184 | 333 - This is a test of the merging algohm - 3333 |
| 185 | 185 | 444 - If all goes well, we will be pleased - 4444 |
| 186 | 186 | 555 - we think it well and other stuff too - 5555 |
| 187 | 187 | } |
| @@ -297,38 +297,38 @@ | ||
| 297 | 297 | STUV |
| 298 | 298 | XYZ. |
| 299 | 299 | } |
| 300 | 300 | write_file_indented t23 { |
| 301 | 301 | abcd |
| 302 | - <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<< | |
| 302 | + <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 2) | |
| 303 | 303 | efgh 2 |
| 304 | 304 | ijkl 2 |
| 305 | 305 | mnop 2 |
| 306 | 306 | qrst |
| 307 | 307 | uvwx |
| 308 | 308 | yzAB 2 |
| 309 | 309 | CDEF 2 |
| 310 | 310 | GHIJ 2 |
| 311 | - ||||||| COMMON ANCESTOR content follows |||||||||||||||||||||||||||| | |
| 311 | + ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 2) | |
| 312 | 312 | efgh |
| 313 | 313 | ijkl |
| 314 | 314 | mnop |
| 315 | 315 | qrst |
| 316 | 316 | uvwx |
| 317 | 317 | yzAB |
| 318 | 318 | CDEF |
| 319 | 319 | GHIJ |
| 320 | - ======= MERGED IN content follows ================================== | |
| 320 | + ======= MERGED IN content follows =============================== (line 2) | |
| 321 | 321 | efgh |
| 322 | 322 | ijkl |
| 323 | 323 | mnop 3 |
| 324 | 324 | qrst 3 |
| 325 | 325 | uvwx 3 |
| 326 | 326 | yzAB 3 |
| 327 | 327 | CDEF |
| 328 | 328 | GHIJ |
| 329 | - >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 329 | + >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 330 | 330 | KLMN |
| 331 | 331 | OPQR |
| 332 | 332 | STUV |
| 333 | 333 | XYZ. |
| 334 | 334 | } |
| @@ -365,38 +365,38 @@ | ||
| 365 | 365 | STUV |
| 366 | 366 | XYZ. |
| 367 | 367 | } |
| 368 | 368 | write_file_indented t23 { |
| 369 | 369 | abcd |
| 370 | - <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<< | |
| 370 | + <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<< (line 2) | |
| 371 | 371 | efgh 2 |
| 372 | 372 | ijkl 2 |
| 373 | 373 | mnop |
| 374 | 374 | qrst |
| 375 | 375 | uvwx |
| 376 | 376 | yzAB 2 |
| 377 | 377 | CDEF 2 |
| 378 | 378 | GHIJ 2 |
| 379 | - ||||||| COMMON ANCESTOR content follows |||||||||||||||||||||||||||| | |
| 379 | + ||||||| COMMON ANCESTOR content follows ||||||||||||||||||||||||| (line 2) | |
| 380 | 380 | efgh |
| 381 | 381 | ijkl |
| 382 | 382 | mnop |
| 383 | 383 | qrst |
| 384 | 384 | uvwx |
| 385 | 385 | yzAB |
| 386 | 386 | CDEF |
| 387 | 387 | GHIJ |
| 388 | - ======= MERGED IN content follows ================================== | |
| 388 | + ======= MERGED IN content follows =============================== (line 2) | |
| 389 | 389 | efgh |
| 390 | 390 | ijkl |
| 391 | 391 | mnop 3 |
| 392 | 392 | qrst 3 |
| 393 | 393 | uvwx 3 |
| 394 | 394 | yzAB 3 |
| 395 | 395 | CDEF |
| 396 | 396 | GHIJ |
| 397 | - >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 397 | + >>>>>>> END MERGE CONFLICT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| 398 | 398 | KLMN |
| 399 | 399 | OPQR |
| 400 | 400 | STUV |
| 401 | 401 | XYZ. |
| 402 | 402 | } |
| 403 | 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 <<<<<<<<<<<<<<< |
| 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 @@ | ||
| 24 | 24 | write_file t1 [join [string trim $basis] \n]\n |
| 25 | 25 | write_file t2 [join [string trim $v1] \n]\n |
| 26 | 26 | write_file t3 [join [string trim $v2] \n]\n |
| 27 | 27 | fossil 3-way-merge t1 t2 t3 t4 |
| 28 | 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 | |
| 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 | |
| 34 | 41 | set x [split [string trim $x] \n] |
| 35 | 42 | set result [string trim $result] |
| 36 | 43 | if {$x!=$result} { |
| 37 | 44 | protOut " Expected \[$result\]" |
| 38 | 45 | protOut " Got \[$x\]" |
| 39 | 46 |
| --- 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 |
+4
-4
| --- test/merge4.test | ||
| +++ test/merge4.test | ||
| @@ -25,17 +25,17 @@ | ||
| 25 | 25 | write_file t2 [join [string trim $v1] \n]\n |
| 26 | 26 | write_file t3 [join [string trim $v2] \n]\n |
| 27 | 27 | fossil 3-way-merge t1 t2 t3 t4 |
| 28 | 28 | fossil 3-way-merge t1 t3 t2 t5 |
| 29 | 29 | 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 | |
| 32 | 32 | regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x |
| 33 | 33 | set x [split [string trim $x] \n] |
| 34 | 34 | 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 | |
| 37 | 37 | regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $y {<} y |
| 38 | 38 | set y [split [string trim $y] \n] |
| 39 | 39 | set result1 [string trim $result1] |
| 40 | 40 | if {$x!=$result1} { |
| 41 | 41 | protOut " Expected \[$result1\]" |
| 42 | 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.*<<} $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 |
+9
-7
| --- test/merge_renames.test | ||
| +++ test/merge_renames.test | ||
| @@ -264,18 +264,20 @@ | ||
| 264 | 264 | |
| 265 | 265 | fossil update trunk |
| 266 | 266 | fossil merge b1 |
| 267 | 267 | fossil merge b2 |
| 268 | 268 | test_status_list merge_renames-8-1 $RESULT { |
| 269 | - WARNING: no common ancestor for f1 | |
| 269 | + MERGE f1 | |
| 270 | + WARNING: 1 merge conflicts | |
| 270 | 271 | } |
| 271 | 272 | |
| 272 | 273 | fossil revert |
| 273 | 274 | fossil merge --integrate b1 |
| 274 | 275 | fossil merge b2 |
| 275 | 276 | test_status_list merge_renames-8-2 $RESULT { |
| 276 | - WARNING: no common ancestor for f1 | |
| 277 | + MERGE f1 | |
| 278 | + WARNING: 1 merge conflicts | |
| 277 | 279 | } |
| 278 | 280 | |
| 279 | 281 | ############################################# |
| 280 | 282 | # Test 9 # |
| 281 | 283 | # Merging a delete/rename/add combination # |
| @@ -308,12 +310,12 @@ | ||
| 308 | 310 | test_status_list merge_renames-9-1 $RESULT $expectedMerge |
| 309 | 311 | fossil changes |
| 310 | 312 | test_status_list merge_renames-9-2 $RESULT " |
| 311 | 313 | MERGED_WITH [commit_id b] |
| 312 | 314 | ADDED_BY_MERGE f1 |
| 313 | - RENAMED f2 | |
| 314 | - DELETED f2 (overwritten by rename) | |
| 315 | + RENAMED f1 -> f2 | |
| 316 | + DELETED f2 -> f2 (overwritten by rename) | |
| 315 | 317 | " |
| 316 | 318 | test_file_contents merge_renames-9-3 f1 "f1.1" |
| 317 | 319 | test_file_contents merge_renames-9-4 f2 "f1" |
| 318 | 320 | |
| 319 | 321 | # Undo and ensure a dry run merge results in no changes |
| @@ -368,12 +370,12 @@ | ||
| 368 | 370 | RENAME f2 -> f1 |
| 369 | 371 | } |
| 370 | 372 | test_file_contents merge_renames-10-5 f1 "f1" |
| 371 | 373 | test_file_contents merge_renames-10-6 f2 "f2" |
| 372 | 374 | test_status_list merge_renames-10-7 [fossil changes] " |
| 373 | - RENAMED f1 | |
| 374 | - RENAMED f2 | |
| 375 | + RENAMED f1 -> f2 | |
| 376 | + RENAMED f2 -> f1 | |
| 375 | 377 | BACKOUT [commit_id trunk] |
| 376 | 378 | " |
| 377 | 379 | fossil commit -m "swap back" ;# V |
| 378 | 380 | |
| 379 | 381 | fossil merge b |
| @@ -495,11 +497,11 @@ | ||
| 495 | 497 | fossil merge trunk |
| 496 | 498 | fossil commit -m "merge trunk" --tag c4 |
| 497 | 499 | fossil mv --hard f2 f2n |
| 498 | 500 | test_status_list merge_renames-13-3 $RESULT " |
| 499 | 501 | RENAME f2 f2n |
| 500 | - MOVED_FILE $repoDir/f2 | |
| 502 | + MOVED_FILE [file normalize $repoDir]/f2 | |
| 501 | 503 | " |
| 502 | 504 | fossil commit -m "renamed f2->f2n" --tag c5 |
| 503 | 505 | |
| 504 | 506 | fossil update trunk |
| 505 | 507 | fossil merge b |
| 506 | 508 |
| --- 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 |
+4
-4
| --- test/merge_warn.test | ||
| +++ test/merge_warn.test | ||
| @@ -42,16 +42,16 @@ | ||
| 42 | 42 | fossil update trunk |
| 43 | 43 | write_file f1 "f1.1" |
| 44 | 44 | write_file f3 "f3.1" |
| 45 | 45 | fossil merge --integrate mrg |
| 46 | 46 | 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 | |
| 48 | 49 | DELETE f1 |
| 50 | + MERGE f2 | |
| 51 | + ADDED f3 (overwrites an unmanaged file), original copy backed up locally | |
| 49 | 52 | 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 | 53 | } |
| 54 | 54 | test merge_warn-2 { |
| 55 | 55 | [string first "ignoring --integrate: mrg is not a leaf" $RESULT]>=0 |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 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: 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 |
+3
-3
| --- test/revert.test | ||
| +++ test/revert.test | ||
| @@ -98,29 +98,29 @@ | ||
| 98 | 98 | revert-test 1-2 f0 { |
| 99 | 99 | UNMANAGE f0 |
| 100 | 100 | } -changes { |
| 101 | 101 | DELETED f1 |
| 102 | 102 | EDITED f2 |
| 103 | - RENAMED f3n | |
| 103 | + RENAMED f3 -> f3n | |
| 104 | 104 | } -addremove { |
| 105 | 105 | ADDED f0 |
| 106 | 106 | } -exists {f0 f2 f3n} -notexists f3 |
| 107 | 107 | |
| 108 | 108 | revert-test 1-3 f1 { |
| 109 | 109 | REVERT f1 |
| 110 | 110 | } -changes { |
| 111 | 111 | ADDED f0 |
| 112 | 112 | EDITED f2 |
| 113 | - RENAMED f3n | |
| 113 | + RENAMED f3 -> f3n | |
| 114 | 114 | } -exists {f0 f1 f2 f3n} -notexists f3 |
| 115 | 115 | |
| 116 | 116 | revert-test 1-4 f2 { |
| 117 | 117 | REVERT f2 |
| 118 | 118 | } -changes { |
| 119 | 119 | ADDED f0 |
| 120 | 120 | DELETED f1 |
| 121 | - RENAMED f3n | |
| 121 | + RENAMED f3 -> f3n | |
| 122 | 122 | } -exists {f0 f2 f3n} -notexists {f1 f3} |
| 123 | 123 | |
| 124 | 124 | # Both files involved in a rename are reverted regardless of which filename |
| 125 | 125 | # is used as an argument to 'fossil revert' |
| 126 | 126 | # |
| 127 | 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 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 |
+1
-1
| --- test/settings-repo.test | ||
| +++ test/settings-repo.test | ||
| @@ -242,11 +242,11 @@ | ||
| 242 | 242 | |
| 243 | 243 | fossil test-th-eval --open-config "setting $name" |
| 244 | 244 | set data [normalize_result] |
| 245 | 245 | |
| 246 | 246 | test settings-set-check2-versionable-$name { |
| 247 | - $data eq $value | |
| 247 | + $data eq "" | |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | file delete $fileName |
| 251 | 251 | |
| 252 | 252 | fossil settings $name --exact |
| 253 | 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 $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 @@ | ||
| 185 | 185 | ADDED f0 |
| 186 | 186 | } -changes { |
| 187 | 187 | ADDED f0 |
| 188 | 188 | MISSING f1 |
| 189 | 189 | EDITED f2 |
| 190 | - RENAMED f3n | |
| 190 | + RENAMED f3 -> f3n | |
| 191 | 191 | } -addremove { |
| 192 | 192 | DELETED f1 |
| 193 | 193 | } -exists {f0 f2 f3n} -notexists {f1 f3} |
| 194 | 194 | |
| 195 | 195 | # Confirm there is no longer a stash saved |
| @@ -292,11 +292,11 @@ | ||
| 292 | 292 | fossil mv --hard f2 f2n |
| 293 | 293 | test_result_state stash-3-2-mv "mv --hard f2 f2n" [concat { |
| 294 | 294 | RENAME f2 f2n |
| 295 | 295 | MOVED_FILE} [file normalize f2] { |
| 296 | 296 | }] -changes { |
| 297 | - RENAMED f2n | |
| 297 | + RENAMED f2 -> f2n | |
| 298 | 298 | } -addremove { |
| 299 | 299 | } -exists {f1 f2n} -notexists {f2} |
| 300 | 300 | |
| 301 | 301 | stash-test 3-2 {save -m f2n} { |
| 302 | 302 | REVERT f2 |
| @@ -307,11 +307,11 @@ | ||
| 307 | 307 | test stash-3-2-show-2 {[regexp {\sf2n} $RESULT]} |
| 308 | 308 | stash-test 3-2-pop {pop} { |
| 309 | 309 | UPDATE f1 |
| 310 | 310 | UPDATE f2n |
| 311 | 311 | } -changes { |
| 312 | - RENAMED f2n | |
| 312 | + RENAMED f2 -> f2n | |
| 313 | 313 | } -addremove { |
| 314 | 314 | } -exists {f1 f2n} -notexists {f2} |
| 315 | 315 | |
| 316 | 316 | |
| 317 | 317 | |
| @@ -368,11 +368,11 @@ | ||
| 368 | 368 | stash-test 4-3 {snapshot -m "snap 3"} { |
| 369 | 369 | } -changes { |
| 370 | 370 | ADDED f0 |
| 371 | 371 | DELETED f1 |
| 372 | 372 | EDITED f2 |
| 373 | - RENAMED f3n | |
| 373 | + RENAMED f3 -> f3n | |
| 374 | 374 | } -addremove { |
| 375 | 375 | } -exists {f0 f2 f3n} -notexists {f1 f3} |
| 376 | 376 | fossil stash diff |
| 377 | 377 | test stash-4-3-diff-CODE {!$::CODE} knownBug |
| 378 | 378 | fossil stash show |
| 379 | 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 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 |
+17
-5
| --- test/symlinks.test | ||
| +++ test/symlinks.test | ||
| @@ -35,10 +35,13 @@ | ||
| 35 | 35 | require_no_open_checkout |
| 36 | 36 | |
| 37 | 37 | ############################################################################### |
| 38 | 38 | |
| 39 | 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 | |
| 40 | 43 | |
| 41 | 44 | fossil test-th-eval --open-config {repository} |
| 42 | 45 | set repository [normalize_result] |
| 43 | 46 | |
| 44 | 47 | if {[string length $repository] == 0} { |
| @@ -62,22 +65,31 @@ | ||
| 62 | 65 | test symlinks-dir-2 {[file exists [file join $rootDir symdirA f1.txt]] eq 1} |
| 63 | 66 | test symlinks-dir-3 {[file exists [file join $rootDir subdirA f2.txt]] eq 1} |
| 64 | 67 | test symlinks-dir-4 {[file exists [file join $rootDir symdirA f2.txt]] eq 1} |
| 65 | 68 | |
| 66 | 69 | fossil add [file join $rootDir symdirA f1.txt] |
| 70 | +test symlinks-skip-dir-traversal {[normalize_result] eq \ | |
| 71 | +"SKIP symdirA/f1.txt"} | |
| 72 | + | |
| 67 | 73 | fossil commit -m "c1" |
| 68 | 74 | |
| 75 | +test symlinks-empty-commit {[normalize_result] eq \ | |
| 76 | +"nothing has changed; use --allow-empty to override"} | |
| 77 | + | |
| 69 | 78 | ############################################################################### |
| 70 | 79 | |
| 71 | 80 | fossil ls |
| 72 | -test symlinks-dir-5 {[normalize_result] eq "symdirA/f1.txt"} | |
| 81 | +test symlinks-dir-5 {[normalize_result] eq ""} | |
| 73 | 82 | |
| 74 | 83 | ############################################################################### |
| 84 | + | |
| 85 | +fossil set allow | |
| 86 | +puts $RESULT | |
| 75 | 87 | |
| 76 | 88 | fossil extras |
| 77 | 89 | 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"} | |
| 79 | 91 | |
| 80 | 92 | ############################################################################### |
| 81 | 93 | |
| 82 | 94 | fossil close |
| 83 | 95 | file delete [file join $rootDir subdirA f1.txt] |
| @@ -87,17 +99,17 @@ | ||
| 87 | 99 | test symlinks-dir-9 {[file exists [file join $rootDir subdirA f2.txt]] eq 1} |
| 88 | 100 | test symlinks-dir-10 {[file exists [file join $rootDir symdirA f2.txt]] eq 1} |
| 89 | 101 | |
| 90 | 102 | ############################################################################### |
| 91 | 103 | |
| 92 | -fossil open $repository | |
| 104 | +fossil open --force $repository | |
| 93 | 105 | set code [catch {file readlink [file join $rootDir symdirA]} result] |
| 94 | 106 | |
| 95 | 107 | test symlinks-dir-11 {$code == 0} |
| 96 | 108 | 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} | |
| 99 | 111 | test symlinks-dir-15 {[file exists [file join $rootDir subdirA f2.txt]] eq 1} |
| 100 | 112 | test symlinks-dir-16 {[file exists [file join $rootDir symdirA f2.txt]] eq 1} |
| 101 | 113 | |
| 102 | 114 | ############################################################################### |
| 103 | 115 | # |
| 104 | 116 |
| --- 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 |
+27
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -20,10 +20,15 @@ | ||
| 20 | 20 | # tclsh ../test/tester.tcl ../bld/fossil |
| 21 | 21 | # |
| 22 | 22 | # Where ../test/tester.tcl is the name of this file and ../bld/fossil |
| 23 | 23 | # is the name of the executable to be tested. |
| 24 | 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 | +# | |
| 25 | 30 | |
| 26 | 31 | # We use some things introduced in 8.6 such as lmap. auto.def should |
| 27 | 32 | # have found us a suitable Tcl installation. |
| 28 | 33 | package require Tcl 8.6 |
| 29 | 34 | |
| @@ -278,10 +283,12 @@ | ||
| 278 | 283 | access-log \ |
| 279 | 284 | admin-log \ |
| 280 | 285 | allow-symlinks \ |
| 281 | 286 | auto-captcha \ |
| 282 | 287 | auto-hyperlink \ |
| 288 | + auto-hyperlink-delay \ | |
| 289 | + auto-hyperlink-mouseover \ | |
| 283 | 290 | auto-shun \ |
| 284 | 291 | autosync \ |
| 285 | 292 | autosync-tries \ |
| 286 | 293 | backoffice-disable \ |
| 287 | 294 | backoffice-logfile \ |
| @@ -292,23 +299,26 @@ | ||
| 292 | 299 | chat-initial-history \ |
| 293 | 300 | chat-inline-images \ |
| 294 | 301 | chat-keep-count \ |
| 295 | 302 | chat-keep-days \ |
| 296 | 303 | chat-poll-timeout \ |
| 304 | + chat-timeline-user \ | |
| 297 | 305 | clean-glob \ |
| 298 | 306 | clearsign \ |
| 299 | 307 | comment-format \ |
| 300 | 308 | crlf-glob \ |
| 301 | 309 | crnl-glob \ |
| 302 | 310 | default-csp \ |
| 303 | 311 | default-perms \ |
| 304 | 312 | diff-binary \ |
| 305 | 313 | diff-command \ |
| 314 | + dont-commit \ | |
| 306 | 315 | dont-push \ |
| 307 | 316 | dotfiles \ |
| 308 | 317 | editor \ |
| 309 | 318 | email-admin \ |
| 319 | + email-listid \ | |
| 310 | 320 | email-renew-interval \ |
| 311 | 321 | email-self \ |
| 312 | 322 | email-send-command \ |
| 313 | 323 | email-send-db \ |
| 314 | 324 | email-send-dir \ |
| @@ -319,18 +329,20 @@ | ||
| 319 | 329 | empty-dirs \ |
| 320 | 330 | encoding-glob \ |
| 321 | 331 | exec-rel-paths \ |
| 322 | 332 | fileedit-glob \ |
| 323 | 333 | forbid-delta-manifests \ |
| 334 | + forum-close-policy \ | |
| 324 | 335 | gdiff-command \ |
| 325 | 336 | gmerge-command \ |
| 326 | 337 | hash-digits \ |
| 327 | 338 | hooks \ |
| 328 | 339 | http-port \ |
| 329 | 340 | https-login \ |
| 330 | 341 | ignore-glob \ |
| 331 | 342 | keep-glob \ |
| 343 | + large-file-size \ | |
| 332 | 344 | localauth \ |
| 333 | 345 | lock-timeout \ |
| 334 | 346 | main-branch \ |
| 335 | 347 | mainmenu \ |
| 336 | 348 | manifest \ |
| @@ -337,18 +349,20 @@ | ||
| 337 | 349 | max-cache-entry \ |
| 338 | 350 | max-loadavg \ |
| 339 | 351 | max-upload \ |
| 340 | 352 | mimetypes \ |
| 341 | 353 | mtime-changes \ |
| 354 | + mv-rm-files \ | |
| 342 | 355 | pgp-command \ |
| 343 | 356 | preferred-diff-type \ |
| 344 | 357 | proxy \ |
| 345 | 358 | redirect-to-https \ |
| 346 | 359 | relative-paths \ |
| 347 | 360 | repo-cksum \ |
| 348 | 361 | repolist-skin \ |
| 349 | 362 | safe-html \ |
| 363 | + self-pw-reset \ | |
| 350 | 364 | self-register \ |
| 351 | 365 | sitemap-extra \ |
| 352 | 366 | ssh-command \ |
| 353 | 367 | ssl-ca-location \ |
| 354 | 368 | ssl-identity \ |
| @@ -1072,10 +1086,19 @@ | ||
| 1072 | 1086 | please set TEMP variable in environment, error: $error" |
| 1073 | 1087 | } |
| 1074 | 1088 | |
| 1075 | 1089 | set tempHomePath [file join $tempPath home_[pid]] |
| 1076 | 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 | + | |
| 1077 | 1100 | if {[catch { |
| 1078 | 1101 | file mkdir $tempHomePath |
| 1079 | 1102 | } error] != 0} { |
| 1080 | 1103 | error "Could not make directory \"$tempHomePath\",\ |
| 1081 | 1104 | please set TEMP variable in environment, error: $error" |
| @@ -1094,10 +1117,14 @@ | ||
| 1094 | 1117 | test test-framework-$testfile 1 |
| 1095 | 1118 | } |
| 1096 | 1119 | protOut "***** End of $testfile: [llength $bad_test] errors so far ******" |
| 1097 | 1120 | } |
| 1098 | 1121 | unset ::tempKeepHome; delete_temporary_home |
| 1122 | + | |
| 1123 | +# Clean up the file descriptor | |
| 1124 | +close $possibly_fd0 | |
| 1125 | + | |
| 1099 | 1126 | set nErr [llength $bad_test] |
| 1100 | 1127 | if {$nErr>0 || !$::QUIET} { |
| 1101 | 1128 | protOut "***** Final results: $nErr errors out of $test_count tests" 1 |
| 1102 | 1129 | } |
| 1103 | 1130 | if {$nErr>0} { |
| 1104 | 1131 |
| --- 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 |
+9
-9
| --- test/th1-tcl.test | ||
| +++ test/th1-tcl.test | ||
| @@ -77,55 +77,55 @@ | ||
| 77 | 77 | ############################################################################### |
| 78 | 78 | |
| 79 | 79 | fossil test-th-render --open-config \ |
| 80 | 80 | [file nativename [file join $path th1-tcl3.txt]] |
| 81 | 81 | |
| 82 | -test th1-tcl-3 {$RESULT eq {<hr /><p class="thmainError">ERROR:\ | |
| 82 | +test th1-tcl-3 {$RESULT eq {<hr><p class="thmainError">ERROR:\ | |
| 83 | 83 | invalid command name "bad_command"</p>}} |
| 84 | 84 | |
| 85 | 85 | ############################################################################### |
| 86 | 86 | |
| 87 | 87 | fossil test-th-render --open-config \ |
| 88 | 88 | [file nativename [file join $path th1-tcl4.txt]] |
| 89 | 89 | |
| 90 | -test th1-tcl-4 {$RESULT eq {<hr /><p class="thmainError">ERROR:\ | |
| 90 | +test th1-tcl-4 {$RESULT eq {<hr><p class="thmainError">ERROR:\ | |
| 91 | 91 | divide by zero</p>}} |
| 92 | 92 | |
| 93 | 93 | ############################################################################### |
| 94 | 94 | |
| 95 | 95 | fossil test-th-render --open-config \ |
| 96 | 96 | [file nativename [file join $path th1-tcl5.txt]] |
| 97 | 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\ | |
| 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 | 100 | class="thmainError">ERROR: invalid command name "bad_command"</p>}} |
| 101 | 101 | |
| 102 | 102 | ############################################################################### |
| 103 | 103 | |
| 104 | 104 | fossil test-th-render --open-config \ |
| 105 | 105 | [file nativename [file join $path th1-tcl6.txt]] |
| 106 | 106 | |
| 107 | -test th1-tcl-6 {$RESULT eq {<hr /><p class="thmainError">ERROR:\ | |
| 107 | +test th1-tcl-6 {$RESULT eq {<hr><p class="thmainError">ERROR:\ | |
| 108 | 108 | no such command: bad_command</p>}} |
| 109 | 109 | |
| 110 | 110 | ############################################################################### |
| 111 | 111 | |
| 112 | 112 | fossil test-th-render --open-config \ |
| 113 | 113 | [file nativename [file join $path th1-tcl7.txt]] |
| 114 | 114 | |
| 115 | -test th1-tcl-7 {$RESULT eq {<hr /><p class="thmainError">ERROR:\ | |
| 115 | +test th1-tcl-7 {$RESULT eq {<hr><p class="thmainError">ERROR:\ | |
| 116 | 116 | syntax error in expression: "2**0"</p>}} |
| 117 | 117 | |
| 118 | 118 | ############################################################################### |
| 119 | 119 | |
| 120 | 120 | fossil test-th-render --open-config \ |
| 121 | 121 | [file nativename [file join $path th1-tcl8.txt]] |
| 122 | 122 | |
| 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\ | |
| 125 | 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\ | |
| 126 | +lambda</p>} || $RESULT eq {<hr><p class="thmainError">ERROR: This test\ | |
| 127 | 127 | requires Tcl 8.6 or higher.</p>}} |
| 128 | 128 | |
| 129 | 129 | ############################################################################### |
| 130 | 130 | |
| 131 | 131 | fossil test-th-render --open-config \ |
| 132 | 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 "bad_command"</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 "bad_command"</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: "2**0"</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 "bad_command"</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 "bad_command"</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: "2**0"</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 @@ | ||
| 739 | 739 | $normalized_result {} normalized_result |
| 740 | 740 | |
| 741 | 741 | if {$th1Hooks} { |
| 742 | 742 | test th1-trace-2 {$normalized_result eq \ |
| 743 | 743 | {------------------ BEGIN TRACE LOG ------------------ |
| 744 | -th1-init 0x0 => 0x0<br /> | |
| 744 | +th1-init 0x0 => 0x0<br> | |
| 745 | 745 | |
| 746 | 746 | ------------------- END TRACE LOG -------------------}} |
| 747 | 747 | } else { |
| 748 | 748 | test th1-trace-2 {$normalized_result eq \ |
| 749 | 749 | {------------------ 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> | |
| 752 | 752 | |
| 753 | 753 | ------------------- END TRACE LOG -------------------}} |
| 754 | 754 | } |
| 755 | 755 | |
| 756 | 756 | ############################################################################### |
| @@ -767,18 +767,18 @@ | ||
| 767 | 767 | $normalized_result {} normalized_result |
| 768 | 768 | |
| 769 | 769 | if {$th1Hooks} { |
| 770 | 770 | test th1-trace-4 {$normalized_result eq \ |
| 771 | 771 | {------------------ BEGIN TRACE LOG ------------------ |
| 772 | -th1-init 0x0 => 0x0<br /> | |
| 772 | +th1-init 0x0 => 0x0<br> | |
| 773 | 773 | this is a trace message. |
| 774 | 774 | ------------------- END TRACE LOG -------------------}} |
| 775 | 775 | } else { |
| 776 | 776 | test th1-trace-4 {$normalized_result eq \ |
| 777 | 777 | {------------------ 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> | |
| 780 | 780 | this is a trace message. |
| 781 | 781 | ------------------- END TRACE LOG -------------------}} |
| 782 | 782 | } |
| 783 | 783 | |
| 784 | 784 | ############################################################################### |
| @@ -789,11 +789,13 @@ | ||
| 789 | 789 | |
| 790 | 790 | ############################################################################### |
| 791 | 791 | |
| 792 | 792 | fossil test-th-eval "defHeader" |
| 793 | 793 | 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]]} | |
| 795 | 797 | |
| 796 | 798 | ############################################################################### |
| 797 | 799 | |
| 798 | 800 | fossil test-th-eval "styleHeader {Page Title Here}" |
| 799 | 801 | test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}} |
| @@ -1062,14 +1064,14 @@ | ||
| 1062 | 1064 | set base_commands {anoncap anycap array artifact break breakpoint \ |
| 1063 | 1065 | builtin_request_js capexpr captureTh1 catch cgiHeaderLine checkout \ |
| 1064 | 1066 | combobox continue copybtn date decorate defHeader dir enable_htmlify \ |
| 1065 | 1067 | enable_output encode64 error expr for foreach getParameter glob_match \ |
| 1066 | 1068 | 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 \ | |
| 1071 | 1073 | unversioned uplevel upvar utime verifyCsrf verifyLogin wiki} |
| 1072 | 1074 | set tcl_commands {tclEval tclExpr tclInvoke tclIsSafe tclMakeSafe} |
| 1073 | 1075 | if {$th1Tcl} { |
| 1074 | 1076 | test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands $tcl_commands"]} |
| 1075 | 1077 | } else { |
| 1076 | 1078 |
| --- 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 |
+3
-3
| --- test/unversioned.test | ||
| +++ test/unversioned.test | ||
| @@ -343,11 +343,11 @@ | ||
| 343 | 343 | test unversioned-46 {[regexp \ |
| 344 | 344 | {Round-trips: 1 Artifacts sent: 0 received: 0 |
| 345 | 345 | Round-trips: 1 Artifacts sent: 0 received: 0 |
| 346 | 346 | Round-trips: 2 Artifacts sent: 0 received: 0 |
| 347 | 347 | 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)} \ | |
| 349 | 349 | [normalize_result]]} |
| 350 | 350 | |
| 351 | 351 | ############################################################################### |
| 352 | 352 | |
| 353 | 353 | fossil unversioned ls |
| @@ -389,11 +389,11 @@ | ||
| 389 | 389 | test unversioned-52 {[regexp \ |
| 390 | 390 | {Round-trips: 1 Artifacts sent: 0 received: 0 |
| 391 | 391 | Round-trips: 1 Artifacts sent: 0 received: 0 |
| 392 | 392 | Round-trips: 2 Artifacts sent: 0 received: 0 |
| 393 | 393 | 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)} \ | |
| 395 | 395 | [normalize_result]]} |
| 396 | 396 | |
| 397 | 397 | ############################################################################### |
| 398 | 398 | |
| 399 | 399 | fossil unversioned list |
| @@ -414,11 +414,11 @@ | ||
| 414 | 414 | test unversioned-55 {[regexp \ |
| 415 | 415 | {Round-trips: 1 Artifacts sent: 0 received: 0 |
| 416 | 416 | Round-trips: 1 Artifacts sent: 0 received: 0 |
| 417 | 417 | Round-trips: 2 Artifacts sent: 1 received: 0 |
| 418 | 418 | 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)} \ | |
| 420 | 420 | [normalize_result]]} |
| 421 | 421 | |
| 422 | 422 | ############################################################################### |
| 423 | 423 | |
| 424 | 424 | fossil close |
| 425 | 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, 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 |