Fossil SCM
Fixes for the 'th1' tests.
Commit
e57dc731a9fe2f10f3a66eb9ec6805c985d3d02c98a17d85ac6094a2bca18758
Parent
0d21459e354d72d…
2 files changed
+1
-1
+12
-10
+1
-1
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -602,11 +602,11 @@ | ||
| 602 | 602 | proc test_block_in_checkout { name rscript {tscript ""} } { |
| 603 | 603 | if {$::outside_fossil_repo || $::dirty_ckout} { |
| 604 | 604 | set $::CODE 0 |
| 605 | 605 | set $::RESULT "" |
| 606 | 606 | } else { |
| 607 | - run_in_checkout $rscript | |
| 607 | + uplevel 1 [list run_in_checkout $rscript] | |
| 608 | 608 | if {[string length $tscript] == 0} { |
| 609 | 609 | return "" |
| 610 | 610 | } else { |
| 611 | 611 | set code [catch { |
| 612 | 612 | uplevel 1 $tscript |
| 613 | 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 | 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 @@ | ||
| 778 | 778 | {TH_ERROR: wrong # args: should be "defHeader"}} |
| 779 | 779 | |
| 780 | 780 | ############################################################################### |
| 781 | 781 | |
| 782 | 782 | 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]]} | |
| 784 | 785 | |
| 785 | 786 | ############################################################################### |
| 786 | 787 | |
| 787 | 788 | fossil test-th-eval "styleHeader {Page Title Here}" |
| 788 | 789 | test th1-header-1 {$RESULT eq {TH_ERROR: repository unavailable}} |
| @@ -1046,19 +1047,20 @@ | ||
| 1046 | 1047 | # command lists eliminates a dependence on order. |
| 1047 | 1048 | # |
| 1048 | 1049 | fossil test-th-eval "info commands" |
| 1049 | 1050 | set sorted_result [lsort $RESULT] |
| 1050 | 1051 | 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} | |
| 1060 | 1062 | set tcl_commands {tclEval tclExpr tclInvoke tclIsSafe tclMakeSafe} |
| 1061 | 1063 | if {$th1Tcl} { |
| 1062 | 1064 | test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands $tcl_commands"]} |
| 1063 | 1065 | } else { |
| 1064 | 1066 | test th1-info-commands-1 {$sorted_result eq [lsort "$base_commands"]} |
| 1065 | 1067 |
| --- 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 |