Fossil SCM

Fixes for the 'th1' tests.

mistachkin 2021-03-18 02:01 trunk
Commit e57dc731a9fe2f10f3a66eb9ec6805c985d3d02c98a17d85ac6094a2bca18758
2 files changed +1 -1 +12 -10
+1 -1
--- test/tester.tcl
+++ test/tester.tcl
@@ -602,11 +602,11 @@
602602
proc test_block_in_checkout { name rscript {tscript ""} } {
603603
if {$::outside_fossil_repo || $::dirty_ckout} {
604604
set $::CODE 0
605605
set $::RESULT ""
606606
} else {
607
- run_in_checkout $rscript
607
+ uplevel 1 [list run_in_checkout $rscript]
608608
if {[string length $tscript] == 0} {
609609
return ""
610610
} else {
611611
set code [catch {
612612
uplevel 1 $tscript
613613
--- test/tester.tcl
+++ test/tester.tcl
@@ -602,11 +602,11 @@
602 proc test_block_in_checkout { name rscript {tscript ""} } {
603 if {$::outside_fossil_repo || $::dirty_ckout} {
604 set $::CODE 0
605 set $::RESULT ""
606 } else {
607 run_in_checkout $rscript
608 if {[string length $tscript] == 0} {
609 return ""
610 } else {
611 set code [catch {
612 uplevel 1 $tscript
613
--- test/tester.tcl
+++ test/tester.tcl
@@ -602,11 +602,11 @@
602 proc test_block_in_checkout { name rscript {tscript ""} } {
603 if {$::outside_fossil_repo || $::dirty_ckout} {
604 set $::CODE 0
605 set $::RESULT ""
606 } else {
607 uplevel 1 [list run_in_checkout $rscript]
608 if {[string length $tscript] == 0} {
609 return ""
610 } else {
611 set code [catch {
612 uplevel 1 $tscript
613
+12 -10
--- test/th1.test
+++ test/th1.test
@@ -778,11 +778,12 @@
778778
{TH_ERROR: wrong # args: should be "defHeader"}}
779779
780780
###############################################################################
781781
782782
fossil test-th-eval "defHeader"
783
-test th1-defHeader-2 {[string match *<body> [normalize_result]]}
783
+test th1-defHeader-2 {[string match *<body> [normalize_result]] || \
784
+ [string match "*<body class=\"\$current_feature\">" [normalize_result]]}
784785
785786
###############################################################################
786787
787788
fossil test-th-eval "styleHeader {Page Title Here}"
788789
test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -1046,19 +1047,20 @@
10461047
# command lists eliminates a dependence on order.
10471048
#
10481049
fossil test-th-eval "info commands"
10491050
set sorted_result [lsort $RESULT]
10501051
protOut "Sorted: $sorted_result"
1051
-set base_commands {anoncap anycap array artifact break breakpoint catch\
1052
- cgiHeaderLine checkout combobox continue copybtn date decorate \
1053
- defHeader dir enable_output encode64 error expr for getParameter \
1054
- glob_match globalState hascap hasfeature html htmlize http httpize if \
1055
- info insertCsrf lindex linecount list llength lsearch markdown nonce \
1056
- proc puts query randhex redirect regexp reinitialize rename render \
1057
- repository return searchable set setParameter setting stime string \
1058
- styleFooter styleHeader styleScript tclReady trace unset unversioned \
1059
- uplevel upvar utime verifyCsrf verifyLogin wiki}
1052
+set base_commands {anoncap anycap array artifact break breakpoint \
1053
+ builtin_request_js capexpr captureTh1 catch cgiHeaderLine checkout \
1054
+ combobox continue copybtn date decorate defHeader dir enable_htmlify \
1055
+ enable_output encode64 error expr for foreach getParameter glob_match \
1056
+ globalState hascap hasfeature html htmlize http httpize if info \
1057
+ insertCsrf lappend lindex linecount list llength lsearch markdown \
1058
+ nonce proc puts query randhex redirect regexp reinitialize rename \
1059
+ render repository return searchable set setParameter setting stime \
1060
+ string styleFooter styleHeader styleScript tclReady trace unset \
1061
+ unversioned uplevel upvar utime verifyCsrf verifyLogin wiki}
10601062
set tcl_commands {tclEval tclExpr tclInvoke tclIsSafe tclMakeSafe}
10611063
if {$th1Tcl} {
10621064
test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands $tcl_commands"]}
10631065
} else {
10641066
test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands"]}
10651067
--- test/th1.test
+++ test/th1.test
@@ -778,11 +778,12 @@
778 {TH_ERROR: wrong # args: should be "defHeader"}}
779
780 ###############################################################################
781
782 fossil test-th-eval "defHeader"
783 test th1-defHeader-2 {[string match *<body> [normalize_result]]}
 
784
785 ###############################################################################
786
787 fossil test-th-eval "styleHeader {Page Title Here}"
788 test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -1046,19 +1047,20 @@
1046 # command lists eliminates a dependence on order.
1047 #
1048 fossil test-th-eval "info commands"
1049 set sorted_result [lsort $RESULT]
1050 protOut "Sorted: $sorted_result"
1051 set base_commands {anoncap anycap array artifact break breakpoint catch\
1052 cgiHeaderLine checkout combobox continue copybtn date decorate \
1053 defHeader dir enable_output encode64 error expr for getParameter \
1054 glob_match globalState hascap hasfeature html htmlize http httpize if \
1055 info insertCsrf lindex linecount list llength lsearch markdown nonce \
1056 proc puts query randhex redirect regexp reinitialize rename render \
1057 repository return searchable set setParameter setting stime string \
1058 styleFooter styleHeader styleScript tclReady trace unset unversioned \
1059 uplevel upvar utime verifyCsrf verifyLogin wiki}
 
1060 set tcl_commands {tclEval tclExpr tclInvoke tclIsSafe tclMakeSafe}
1061 if {$th1Tcl} {
1062 test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands $tcl_commands"]}
1063 } else {
1064 test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands"]}
1065
--- test/th1.test
+++ test/th1.test
@@ -778,11 +778,12 @@
778 {TH_ERROR: wrong # args: should be "defHeader"}}
779
780 ###############################################################################
781
782 fossil test-th-eval "defHeader"
783 test th1-defHeader-2 {[string match *<body> [normalize_result]] || \
784 [string match "*<body class=\"\$current_feature\">" [normalize_result]]}
785
786 ###############################################################################
787
788 fossil test-th-eval "styleHeader {Page Title Here}"
789 test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}}
@@ -1046,19 +1047,20 @@
1047 # command lists eliminates a dependence on order.
1048 #
1049 fossil test-th-eval "info commands"
1050 set sorted_result [lsort $RESULT]
1051 protOut "Sorted: $sorted_result"
1052 set base_commands {anoncap anycap array artifact break breakpoint \
1053 builtin_request_js capexpr captureTh1 catch cgiHeaderLine checkout \
1054 combobox continue copybtn date decorate defHeader dir enable_htmlify \
1055 enable_output encode64 error expr for foreach getParameter glob_match \
1056 globalState hascap hasfeature html htmlize http httpize if info \
1057 insertCsrf lappend lindex linecount list llength lsearch markdown \
1058 nonce proc puts query randhex redirect regexp reinitialize rename \
1059 render repository return searchable set setParameter setting stime \
1060 string styleFooter styleHeader styleScript tclReady trace unset \
1061 unversioned uplevel upvar utime verifyCsrf verifyLogin wiki}
1062 set tcl_commands {tclEval tclExpr tclInvoke tclIsSafe tclMakeSafe}
1063 if {$th1Tcl} {
1064 test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands $tcl_commands"]}
1065 } else {
1066 test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands"]}
1067

Keyboard Shortcuts

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