Fossil SCM
Normalize TH1 script evaluation results used internally by the test suite.
Commit
22c62dba300b262d0fc7d6cc3c49a10bd5252bc7
Parent
019725ba5529382…
1 file changed
+11
-11
+11
-11
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -210,11 +210,11 @@ | ||
| 210 | 210 | th1-setup \ |
| 211 | 211 | th1-uri-regexp] |
| 212 | 212 | |
| 213 | 213 | fossil test-th-eval "hasfeature tcl" |
| 214 | 214 | |
| 215 | - if {$::RESULT eq "1"} { | |
| 215 | + if {[normalize_result] eq "1"} { | |
| 216 | 216 | lappend result tcl-setup |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | return [lsort -dictionary $result] |
| 220 | 220 | } |
| @@ -275,29 +275,29 @@ | ||
| 275 | 275 | uv-sync \ |
| 276 | 276 | web-browser] |
| 277 | 277 | |
| 278 | 278 | fossil test-th-eval "hasfeature legacyMvRm" |
| 279 | 279 | |
| 280 | - if {$::RESULT eq "1"} { | |
| 280 | + if {[normalize_result] eq "1"} { | |
| 281 | 281 | lappend result mv-rm-files |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | fossil test-th-eval "hasfeature tcl" |
| 285 | 285 | |
| 286 | - if {$::RESULT eq "1"} { | |
| 286 | + if {[normalize_result] eq "1"} { | |
| 287 | 287 | lappend result tcl tcl-setup |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | fossil test-th-eval "hasfeature th1Docs" |
| 291 | 291 | |
| 292 | - if {$::RESULT eq "1"} { | |
| 292 | + if {[normalize_result] eq "1"} { | |
| 293 | 293 | lappend result th1-docs |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | fossil test-th-eval "hasfeature th1Hooks" |
| 297 | 297 | |
| 298 | - if {$::RESULT eq "1"} { | |
| 298 | + if {[normalize_result] eq "1"} { | |
| 299 | 299 | lappend result th1-hooks |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | return [lsort -dictionary $result] |
| 303 | 303 | } |
| @@ -440,27 +440,27 @@ | ||
| 440 | 440 | |
| 441 | 441 | # This procedure only returns non-zero if the Tcl integration feature was |
| 442 | 442 | # enabled at compile-time and is now enabled at runtime. |
| 443 | 443 | proc is_tcl_usable_by_fossil {} { |
| 444 | 444 | fossil test-th-eval "hasfeature tcl" |
| 445 | - if {$::RESULT ne "1"} {return 0} | |
| 445 | + if {[normalize_result] ne "1"} {return 0} | |
| 446 | 446 | fossil test-th-eval "setting tcl" |
| 447 | - if {$::RESULT eq "1"} {return 1} | |
| 447 | + if {[normalize_result] eq "1"} {return 1} | |
| 448 | 448 | fossil test-th-eval --open-config "setting tcl" |
| 449 | - if {$::RESULT eq "1"} {return 1} | |
| 449 | + if {[normalize_result] eq "1"} {return 1} | |
| 450 | 450 | return [info exists ::env(TH1_ENABLE_TCL)] |
| 451 | 451 | } |
| 452 | 452 | |
| 453 | 453 | # This procedure only returns non-zero if the TH1 hooks feature was enabled |
| 454 | 454 | # at compile-time and is now enabled at runtime. |
| 455 | 455 | proc are_th1_hooks_usable_by_fossil {} { |
| 456 | 456 | fossil test-th-eval "hasfeature th1Hooks" |
| 457 | - if {$::RESULT ne "1"} {return 0} | |
| 457 | + if {[normalize_result] ne "1"} {return 0} | |
| 458 | 458 | fossil test-th-eval "setting th1-hooks" |
| 459 | - if {$::RESULT eq "1"} {return 1} | |
| 459 | + if {[normalize_result] eq "1"} {return 1} | |
| 460 | 460 | fossil test-th-eval --open-config "setting th1-hooks" |
| 461 | - if {$::RESULT eq "1"} {return 1} | |
| 461 | + if {[normalize_result] eq "1"} {return 1} | |
| 462 | 462 | return [info exists ::env(TH1_ENABLE_HOOKS)] |
| 463 | 463 | } |
| 464 | 464 | |
| 465 | 465 | # This (rarely used) procedure is designed to run a test within the Fossil |
| 466 | 466 | # source checkout (e.g. one that does NOT modify any state), while saving |
| 467 | 467 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -210,11 +210,11 @@ | |
| 210 | th1-setup \ |
| 211 | th1-uri-regexp] |
| 212 | |
| 213 | fossil test-th-eval "hasfeature tcl" |
| 214 | |
| 215 | if {$::RESULT eq "1"} { |
| 216 | lappend result tcl-setup |
| 217 | } |
| 218 | |
| 219 | return [lsort -dictionary $result] |
| 220 | } |
| @@ -275,29 +275,29 @@ | |
| 275 | uv-sync \ |
| 276 | web-browser] |
| 277 | |
| 278 | fossil test-th-eval "hasfeature legacyMvRm" |
| 279 | |
| 280 | if {$::RESULT eq "1"} { |
| 281 | lappend result mv-rm-files |
| 282 | } |
| 283 | |
| 284 | fossil test-th-eval "hasfeature tcl" |
| 285 | |
| 286 | if {$::RESULT eq "1"} { |
| 287 | lappend result tcl tcl-setup |
| 288 | } |
| 289 | |
| 290 | fossil test-th-eval "hasfeature th1Docs" |
| 291 | |
| 292 | if {$::RESULT eq "1"} { |
| 293 | lappend result th1-docs |
| 294 | } |
| 295 | |
| 296 | fossil test-th-eval "hasfeature th1Hooks" |
| 297 | |
| 298 | if {$::RESULT eq "1"} { |
| 299 | lappend result th1-hooks |
| 300 | } |
| 301 | |
| 302 | return [lsort -dictionary $result] |
| 303 | } |
| @@ -440,27 +440,27 @@ | |
| 440 | |
| 441 | # This procedure only returns non-zero if the Tcl integration feature was |
| 442 | # enabled at compile-time and is now enabled at runtime. |
| 443 | proc is_tcl_usable_by_fossil {} { |
| 444 | fossil test-th-eval "hasfeature tcl" |
| 445 | if {$::RESULT ne "1"} {return 0} |
| 446 | fossil test-th-eval "setting tcl" |
| 447 | if {$::RESULT eq "1"} {return 1} |
| 448 | fossil test-th-eval --open-config "setting tcl" |
| 449 | if {$::RESULT eq "1"} {return 1} |
| 450 | return [info exists ::env(TH1_ENABLE_TCL)] |
| 451 | } |
| 452 | |
| 453 | # This procedure only returns non-zero if the TH1 hooks feature was enabled |
| 454 | # at compile-time and is now enabled at runtime. |
| 455 | proc are_th1_hooks_usable_by_fossil {} { |
| 456 | fossil test-th-eval "hasfeature th1Hooks" |
| 457 | if {$::RESULT ne "1"} {return 0} |
| 458 | fossil test-th-eval "setting th1-hooks" |
| 459 | if {$::RESULT eq "1"} {return 1} |
| 460 | fossil test-th-eval --open-config "setting th1-hooks" |
| 461 | if {$::RESULT eq "1"} {return 1} |
| 462 | return [info exists ::env(TH1_ENABLE_HOOKS)] |
| 463 | } |
| 464 | |
| 465 | # This (rarely used) procedure is designed to run a test within the Fossil |
| 466 | # source checkout (e.g. one that does NOT modify any state), while saving |
| 467 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -210,11 +210,11 @@ | |
| 210 | th1-setup \ |
| 211 | th1-uri-regexp] |
| 212 | |
| 213 | fossil test-th-eval "hasfeature tcl" |
| 214 | |
| 215 | if {[normalize_result] eq "1"} { |
| 216 | lappend result tcl-setup |
| 217 | } |
| 218 | |
| 219 | return [lsort -dictionary $result] |
| 220 | } |
| @@ -275,29 +275,29 @@ | |
| 275 | uv-sync \ |
| 276 | web-browser] |
| 277 | |
| 278 | fossil test-th-eval "hasfeature legacyMvRm" |
| 279 | |
| 280 | if {[normalize_result] eq "1"} { |
| 281 | lappend result mv-rm-files |
| 282 | } |
| 283 | |
| 284 | fossil test-th-eval "hasfeature tcl" |
| 285 | |
| 286 | if {[normalize_result] eq "1"} { |
| 287 | lappend result tcl tcl-setup |
| 288 | } |
| 289 | |
| 290 | fossil test-th-eval "hasfeature th1Docs" |
| 291 | |
| 292 | if {[normalize_result] eq "1"} { |
| 293 | lappend result th1-docs |
| 294 | } |
| 295 | |
| 296 | fossil test-th-eval "hasfeature th1Hooks" |
| 297 | |
| 298 | if {[normalize_result] eq "1"} { |
| 299 | lappend result th1-hooks |
| 300 | } |
| 301 | |
| 302 | return [lsort -dictionary $result] |
| 303 | } |
| @@ -440,27 +440,27 @@ | |
| 440 | |
| 441 | # This procedure only returns non-zero if the Tcl integration feature was |
| 442 | # enabled at compile-time and is now enabled at runtime. |
| 443 | proc is_tcl_usable_by_fossil {} { |
| 444 | fossil test-th-eval "hasfeature tcl" |
| 445 | if {[normalize_result] ne "1"} {return 0} |
| 446 | fossil test-th-eval "setting tcl" |
| 447 | if {[normalize_result] eq "1"} {return 1} |
| 448 | fossil test-th-eval --open-config "setting tcl" |
| 449 | if {[normalize_result] eq "1"} {return 1} |
| 450 | return [info exists ::env(TH1_ENABLE_TCL)] |
| 451 | } |
| 452 | |
| 453 | # This procedure only returns non-zero if the TH1 hooks feature was enabled |
| 454 | # at compile-time and is now enabled at runtime. |
| 455 | proc are_th1_hooks_usable_by_fossil {} { |
| 456 | fossil test-th-eval "hasfeature th1Hooks" |
| 457 | if {[normalize_result] ne "1"} {return 0} |
| 458 | fossil test-th-eval "setting th1-hooks" |
| 459 | if {[normalize_result] eq "1"} {return 1} |
| 460 | fossil test-th-eval --open-config "setting th1-hooks" |
| 461 | if {[normalize_result] eq "1"} {return 1} |
| 462 | return [info exists ::env(TH1_ENABLE_HOOKS)] |
| 463 | } |
| 464 | |
| 465 | # This (rarely used) procedure is designed to run a test within the Fossil |
| 466 | # source checkout (e.g. one that does NOT modify any state), while saving |
| 467 |