Fossil SCM

Normalize TH1 script evaluation results used internally by the test suite.

mistachkin 2016-10-05 06:39 trunk
Commit 22c62dba300b262d0fc7d6cc3c49a10bd5252bc7
1 file changed +11 -11
+11 -11
--- test/tester.tcl
+++ test/tester.tcl
@@ -210,11 +210,11 @@
210210
th1-setup \
211211
th1-uri-regexp]
212212
213213
fossil test-th-eval "hasfeature tcl"
214214
215
- if {$::RESULT eq "1"} {
215
+ if {[normalize_result] eq "1"} {
216216
lappend result tcl-setup
217217
}
218218
219219
return [lsort -dictionary $result]
220220
}
@@ -275,29 +275,29 @@
275275
uv-sync \
276276
web-browser]
277277
278278
fossil test-th-eval "hasfeature legacyMvRm"
279279
280
- if {$::RESULT eq "1"} {
280
+ if {[normalize_result] eq "1"} {
281281
lappend result mv-rm-files
282282
}
283283
284284
fossil test-th-eval "hasfeature tcl"
285285
286
- if {$::RESULT eq "1"} {
286
+ if {[normalize_result] eq "1"} {
287287
lappend result tcl tcl-setup
288288
}
289289
290290
fossil test-th-eval "hasfeature th1Docs"
291291
292
- if {$::RESULT eq "1"} {
292
+ if {[normalize_result] eq "1"} {
293293
lappend result th1-docs
294294
}
295295
296296
fossil test-th-eval "hasfeature th1Hooks"
297297
298
- if {$::RESULT eq "1"} {
298
+ if {[normalize_result] eq "1"} {
299299
lappend result th1-hooks
300300
}
301301
302302
return [lsort -dictionary $result]
303303
}
@@ -440,27 +440,27 @@
440440
441441
# This procedure only returns non-zero if the Tcl integration feature was
442442
# enabled at compile-time and is now enabled at runtime.
443443
proc is_tcl_usable_by_fossil {} {
444444
fossil test-th-eval "hasfeature tcl"
445
- if {$::RESULT ne "1"} {return 0}
445
+ if {[normalize_result] ne "1"} {return 0}
446446
fossil test-th-eval "setting tcl"
447
- if {$::RESULT eq "1"} {return 1}
447
+ if {[normalize_result] eq "1"} {return 1}
448448
fossil test-th-eval --open-config "setting tcl"
449
- if {$::RESULT eq "1"} {return 1}
449
+ if {[normalize_result] eq "1"} {return 1}
450450
return [info exists ::env(TH1_ENABLE_TCL)]
451451
}
452452
453453
# This procedure only returns non-zero if the TH1 hooks feature was enabled
454454
# at compile-time and is now enabled at runtime.
455455
proc are_th1_hooks_usable_by_fossil {} {
456456
fossil test-th-eval "hasfeature th1Hooks"
457
- if {$::RESULT ne "1"} {return 0}
457
+ if {[normalize_result] ne "1"} {return 0}
458458
fossil test-th-eval "setting th1-hooks"
459
- if {$::RESULT eq "1"} {return 1}
459
+ if {[normalize_result] eq "1"} {return 1}
460460
fossil test-th-eval --open-config "setting th1-hooks"
461
- if {$::RESULT eq "1"} {return 1}
461
+ if {[normalize_result] eq "1"} {return 1}
462462
return [info exists ::env(TH1_ENABLE_HOOKS)]
463463
}
464464
465465
# This (rarely used) procedure is designed to run a test within the Fossil
466466
# source checkout (e.g. one that does NOT modify any state), while saving
467467
--- 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

Keyboard Shortcuts

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