Fossil SCM
Add test to verify behavior for missing objProcs. Also, make sure Tcl integration is enabled for the tests.
Commit
cba0f25bf2996f9ee6557dfc0ca7bafa9d0c2121
Parent
8f6a03f7d18783a…
2 files changed
+12
+11
+12
| --- test/th1-tcl.test | ||
| +++ test/th1-tcl.test | ||
| @@ -20,10 +20,14 @@ | ||
| 20 | 20 | |
| 21 | 21 | set dir [file dirname [info script]] |
| 22 | 22 | |
| 23 | 23 | ############################################################################### |
| 24 | 24 | |
| 25 | +set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test. | |
| 26 | + | |
| 27 | +############################################################################### | |
| 28 | + | |
| 25 | 29 | fossil test-th-render [file nativename [file join $dir th1-tcl1.txt]] |
| 26 | 30 | |
| 27 | 31 | test th1-tcl-1 {[regexp -- {^\d+ |
| 28 | 32 | \d+ |
| 29 | 33 | \d+ |
| @@ -83,5 +87,13 @@ | ||
| 83 | 87 | |
| 84 | 88 | fossil test-th-render [file nativename [file join $dir th1-tcl7.txt]] |
| 85 | 89 | |
| 86 | 90 | test th1-tcl-7 {$RESULT eq {<hr><p class="thmainError">ERROR:\ |
| 87 | 91 | syntax error in expression: "2**0"</p>}} |
| 92 | + | |
| 93 | +############################################################################### | |
| 94 | + | |
| 95 | +fossil test-th-render [file nativename [file join $dir th1-tcl8.txt]] | |
| 96 | + | |
| 97 | +test th1-tcl-8 {$RESULT eq {<hr><p class="thmainError">ERROR:\ | |
| 98 | +Cannot invoke Tcl command: tailcall</p>}} | |
| 99 | + | |
| 88 | 100 | |
| 89 | 101 | ADDED test/th1-tcl8.txt |
| --- test/th1-tcl.test | |
| +++ test/th1-tcl.test | |
| @@ -20,10 +20,14 @@ | |
| 20 | |
| 21 | set dir [file dirname [info script]] |
| 22 | |
| 23 | ############################################################################### |
| 24 | |
| 25 | fossil test-th-render [file nativename [file join $dir th1-tcl1.txt]] |
| 26 | |
| 27 | test th1-tcl-1 {[regexp -- {^\d+ |
| 28 | \d+ |
| 29 | \d+ |
| @@ -83,5 +87,13 @@ | |
| 83 | |
| 84 | fossil test-th-render [file nativename [file join $dir th1-tcl7.txt]] |
| 85 | |
| 86 | test th1-tcl-7 {$RESULT eq {<hr><p class="thmainError">ERROR:\ |
| 87 | syntax error in expression: "2**0"</p>}} |
| 88 | |
| 89 | DDED test/th1-tcl8.txt |
| --- test/th1-tcl.test | |
| +++ test/th1-tcl.test | |
| @@ -20,10 +20,14 @@ | |
| 20 | |
| 21 | set dir [file dirname [info script]] |
| 22 | |
| 23 | ############################################################################### |
| 24 | |
| 25 | set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test. |
| 26 | |
| 27 | ############################################################################### |
| 28 | |
| 29 | fossil test-th-render [file nativename [file join $dir th1-tcl1.txt]] |
| 30 | |
| 31 | test th1-tcl-1 {[regexp -- {^\d+ |
| 32 | \d+ |
| 33 | \d+ |
| @@ -83,5 +87,13 @@ | |
| 87 | |
| 88 | fossil test-th-render [file nativename [file join $dir th1-tcl7.txt]] |
| 89 | |
| 90 | test th1-tcl-7 {$RESULT eq {<hr><p class="thmainError">ERROR:\ |
| 91 | syntax error in expression: "2**0"</p>}} |
| 92 | |
| 93 | ############################################################################### |
| 94 | |
| 95 | fossil test-th-render [file nativename [file join $dir th1-tcl8.txt]] |
| 96 | |
| 97 | test th1-tcl-8 {$RESULT eq {<hr><p class="thmainError">ERROR:\ |
| 98 | Cannot invoke Tcl command: tailcall</p>}} |
| 99 | |
| 100 | |
| 101 | DDED test/th1-tcl8.txt |
+11
| --- a/test/th1-tcl8.txt | ||
| +++ b/test/th1-tcl8.txt | ||
| @@ -0,0 +1,11 @@ | ||
| 1 | +<th1> | |
| 2 | + # | |
| 3 | + # This is a "TH1 fragment" used to test the TH1. | |
| 4 | + #e e | |
| 5 | + # test-script-rendersing test-th-render | |
| 6 | + # Fossil command. | |
| 7 | + # | |
| 8 | + proc doOut {msg} {puts $msg; puts \n} | |
| 9 | + | |
| 10 | + if {[tclInvoke set tcl_version] >= 8.6} { | |
| 11 | + doOut [tclInvoke tailcadoOut "This test requires Tcl |
| --- a/test/th1-tcl8.txt | |
| +++ b/test/th1-tcl8.txt | |
| @@ -0,0 +1,11 @@ | |
| --- a/test/th1-tcl8.txt | |
| +++ b/test/th1-tcl8.txt | |
| @@ -0,0 +1,11 @@ | |
| 1 | <th1> |
| 2 | # |
| 3 | # This is a "TH1 fragment" used to test the TH1. |
| 4 | #e e |
| 5 | # test-script-rendersing test-th-render |
| 6 | # Fossil command. |
| 7 | # |
| 8 | proc doOut {msg} {puts $msg; puts \n} |
| 9 | |
| 10 | if {[tclInvoke set tcl_version] >= 8.6} { |
| 11 | doOut [tclInvoke tailcadoOut "This test requires Tcl |