| | @@ -16,11 +16,11 @@ |
| 16 | 16 | ############################################################################ |
| 17 | 17 | # |
| 18 | 18 | # TH1/Tcl integration |
| 19 | 19 | # |
| 20 | 20 | |
| 21 | | -set dir [file dirname [info script]] |
| 21 | +set path [file dirname [info script]] |
| 22 | 22 | |
| 23 | 23 | ############################################################################### |
| 24 | 24 | |
| 25 | 25 | fossil test-th-eval "hasfeature tcl" |
| 26 | 26 | |
| | @@ -38,11 +38,11 @@ |
| 38 | 38 | set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test. |
| 39 | 39 | |
| 40 | 40 | ############################################################################### |
| 41 | 41 | |
| 42 | 42 | fossil test-th-render --open-config \ |
| 43 | | - [file nativename [file join $dir th1-tcl1.txt]] |
| 43 | + [file nativename [file join $path th1-tcl1.txt]] |
| 44 | 44 | |
| 45 | 45 | test th1-tcl-1 {[regexp -- {^tclReady\(before\) = 0 |
| 46 | 46 | tclReady\(after\) = 1 |
| 47 | 47 | \d+ |
| 48 | 48 | \d+ |
| | @@ -65,62 +65,62 @@ |
| 65 | 65 | |
| 66 | 66 | ############################################################################### |
| 67 | 67 | |
| 68 | 68 | if {[catch {package require sqlite3}] == 0} { |
| 69 | 69 | fossil test-th-render --open-config \ |
| 70 | | - [file nativename [file join $dir th1-tcl2.txt]] |
| 70 | + [file nativename [file join $path th1-tcl2.txt]] |
| 71 | 71 | |
| 72 | 72 | test th1-tcl-2 {[regexp -- {^\d+$} [normalize_result]]} |
| 73 | 73 | } else { |
| 74 | 74 | puts stderr "Skipping 'th1-tcl-2', SQLite package for Tcl not available" |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | ############################################################################### |
| 78 | 78 | |
| 79 | 79 | fossil test-th-render --open-config \ |
| 80 | | - [file nativename [file join $dir th1-tcl3.txt]] |
| 80 | + [file nativename [file join $path th1-tcl3.txt]] |
| 81 | 81 | |
| 82 | 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 | | - [file nativename [file join $dir th1-tcl4.txt]] |
| 88 | + [file nativename [file join $path th1-tcl4.txt]] |
| 89 | 89 | |
| 90 | 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 | | - [file nativename [file join $dir th1-tcl5.txt]] |
| 96 | + [file nativename [file join $path th1-tcl5.txt]] |
| 97 | 97 | |
| 98 | 98 | test th1-tcl-5 {$RESULT eq {<hr /><p class="thmainError">ERROR:\ |
| 99 | 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 | | - [file nativename [file join $dir th1-tcl6.txt]] |
| 105 | + [file nativename [file join $path th1-tcl6.txt]] |
| 106 | 106 | |
| 107 | 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 | | - [file nativename [file join $dir th1-tcl7.txt]] |
| 113 | + [file nativename [file join $path th1-tcl7.txt]] |
| 114 | 114 | |
| 115 | 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 | | - [file nativename [file join $dir th1-tcl8.txt]] |
| 121 | + [file nativename [file join $path th1-tcl8.txt]] |
| 122 | 122 | |
| 123 | 123 | test th1-tcl-8 {$RESULT eq {<hr /><p class="thmainError">ERROR:\ |
| 124 | 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 | 126 | lambda</p>} || $RESULT eq {<hr /><p class="thmainError">ERROR: This test\ |
| | @@ -127,14 +127,14 @@ |
| 127 | 127 | requires Tcl 8.6 or higher.</p>}} |
| 128 | 128 | |
| 129 | 129 | ############################################################################### |
| 130 | 130 | |
| 131 | 131 | fossil test-th-render --open-config \ |
| 132 | | - [file nativename [file join $dir th1-tcl9.txt]] |
| 132 | + [file nativename [file join $path th1-tcl9.txt]] |
| 133 | 133 | |
| 134 | 134 | test th1-tcl-9 {[string trim $RESULT] eq [list [file tail $fossilexe] 3 \ |
| 135 | | -[list test-th-render --open-config [file nativename [file join $dir \ |
| 135 | +[list test-th-render --open-config [file nativename [file join $path \ |
| 136 | 136 | th1-tcl9.txt]]]]} |
| 137 | 137 | |
| 138 | 138 | ############################################################################### |
| 139 | 139 | |
| 140 | 140 | fossil test-th-eval "tclMakeSafe a" |
| 141 | 141 | |