Fossil SCM
Improve test suite logging and add initial tests for comment formatting.
Commit
597c738e8958732095b828ec25736ee34fa85d11
Parent
8da0f3446292400…
2 files changed
+2
+6
-6
+2
| --- a/test/comment.test | ||
| +++ b/test/comment.test | ||
| @@ -0,0 +1,2 @@ | ||
| 1 | +# | |
| 2 | +#5decode5""9\n1#\n *1256855 |
| --- a/test/comment.test | |
| +++ b/test/comment.test | |
| @@ -0,0 +1,2 @@ | |
| --- a/test/comment.test | |
| +++ b/test/comment.test | |
| @@ -0,0 +1,2 @@ | |
| 1 | # |
| 2 | #5decode5""9\n1#\n *1256855 |
+6
-6
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -59,25 +59,25 @@ | ||
| 59 | 59 | |
| 60 | 60 | # start protocol |
| 61 | 61 | # |
| 62 | 62 | proc protInit {cmd} { |
| 63 | 63 | if {$::PROT} { |
| 64 | - set out [open "prot" w] | |
| 64 | + set out [open [file join $::testdir prot] w] | |
| 65 | 65 | fconfigure $out -translation platform |
| 66 | - puts $out "starting tests with:$cmd" | |
| 66 | + puts $out "starting tests with: $cmd" | |
| 67 | 67 | close $out |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | # write protocol |
| 72 | 72 | # |
| 73 | 73 | proc protOut {msg} { |
| 74 | - puts "$msg" | |
| 74 | + puts stdout $msg | |
| 75 | 75 | if {$::PROT} { |
| 76 | - set out [open "prot" a] | |
| 76 | + set out [open [file join $::testdir prot] a] | |
| 77 | 77 | fconfigure $out -translation platform |
| 78 | - puts $out "$msg" | |
| 78 | + puts $out $msg | |
| 79 | 79 | close $out |
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | # Run the fossil program |
| @@ -92,11 +92,11 @@ | ||
| 92 | 92 | |
| 93 | 93 | flush stdout |
| 94 | 94 | set rc [catch {eval exec $cmd} result] |
| 95 | 95 | global RESULT CODE |
| 96 | 96 | set CODE $rc |
| 97 | - if {$rc} {puts "ERROR: $result"} | |
| 97 | + if {$rc} {protOut "ERROR: $result"} | |
| 98 | 98 | set RESULT $result |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | # Read a file into memory. |
| 102 | 102 | # |
| 103 | 103 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -59,25 +59,25 @@ | |
| 59 | |
| 60 | # start protocol |
| 61 | # |
| 62 | proc protInit {cmd} { |
| 63 | if {$::PROT} { |
| 64 | set out [open "prot" w] |
| 65 | fconfigure $out -translation platform |
| 66 | puts $out "starting tests with:$cmd" |
| 67 | close $out |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | # write protocol |
| 72 | # |
| 73 | proc protOut {msg} { |
| 74 | puts "$msg" |
| 75 | if {$::PROT} { |
| 76 | set out [open "prot" a] |
| 77 | fconfigure $out -translation platform |
| 78 | puts $out "$msg" |
| 79 | close $out |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | # Run the fossil program |
| @@ -92,11 +92,11 @@ | |
| 92 | |
| 93 | flush stdout |
| 94 | set rc [catch {eval exec $cmd} result] |
| 95 | global RESULT CODE |
| 96 | set CODE $rc |
| 97 | if {$rc} {puts "ERROR: $result"} |
| 98 | set RESULT $result |
| 99 | } |
| 100 | |
| 101 | # Read a file into memory. |
| 102 | # |
| 103 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -59,25 +59,25 @@ | |
| 59 | |
| 60 | # start protocol |
| 61 | # |
| 62 | proc protInit {cmd} { |
| 63 | if {$::PROT} { |
| 64 | set out [open [file join $::testdir prot] w] |
| 65 | fconfigure $out -translation platform |
| 66 | puts $out "starting tests with: $cmd" |
| 67 | close $out |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | # write protocol |
| 72 | # |
| 73 | proc protOut {msg} { |
| 74 | puts stdout $msg |
| 75 | if {$::PROT} { |
| 76 | set out [open [file join $::testdir prot] a] |
| 77 | fconfigure $out -translation platform |
| 78 | puts $out $msg |
| 79 | close $out |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | # Run the fossil program |
| @@ -92,11 +92,11 @@ | |
| 92 | |
| 93 | flush stdout |
| 94 | set rc [catch {eval exec $cmd} result] |
| 95 | global RESULT CODE |
| 96 | set CODE $rc |
| 97 | if {$rc} {protOut "ERROR: $result"} |
| 98 | set RESULT $result |
| 99 | } |
| 100 | |
| 101 | # Read a file into memory. |
| 102 | # |
| 103 |