Fossil SCM

Improve test suite logging and add initial tests for comment formatting.

mistachkin 2014-06-19 03:55 trunk
Commit 597c738e8958732095b828ec25736ee34fa85d11
--- 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 @@
5959
6060
# start protocol
6161
#
6262
proc protInit {cmd} {
6363
if {$::PROT} {
64
- set out [open "prot" w]
64
+ set out [open [file join $::testdir prot] w]
6565
fconfigure $out -translation platform
66
- puts $out "starting tests with:$cmd"
66
+ puts $out "starting tests with: $cmd"
6767
close $out
6868
}
6969
}
7070
7171
# write protocol
7272
#
7373
proc protOut {msg} {
74
- puts "$msg"
74
+ puts stdout $msg
7575
if {$::PROT} {
76
- set out [open "prot" a]
76
+ set out [open [file join $::testdir prot] a]
7777
fconfigure $out -translation platform
78
- puts $out "$msg"
78
+ puts $out $msg
7979
close $out
8080
}
8181
}
8282
8383
# Run the fossil program
@@ -92,11 +92,11 @@
9292
9393
flush stdout
9494
set rc [catch {eval exec $cmd} result]
9595
global RESULT CODE
9696
set CODE $rc
97
- if {$rc} {puts "ERROR: $result"}
97
+ if {$rc} {protOut "ERROR: $result"}
9898
set RESULT $result
9999
}
100100
101101
# Read a file into memory.
102102
#
103103
--- 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

Keyboard Shortcuts

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