Fossil SCM

Modify expected results for one of the TH1 hooks tests to account for the changes in [274e537bb064db9d].

mistachkin 2016-10-05 08:21 trunk
Commit 6c1359d36715fb0c17ba74e186154e98ce9f53a4
1 file changed +13 -3
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -75,12 +75,17 @@
7575
return -code 2 "TH_RETURN return code"
7676
} elseif {$::cmd_name eq "timeline"} {
7777
set length [llength $::cmd_args]
7878
set length [expr {$length - 1}]
7979
if {[lindex $::cmd_args $length] eq "custom"} {
80
+ append_hook_log "CUSTOM TIMELINE"
8081
emit_hook_log
8182
return "custom timeline"
83
+ } elseif {[lindex $::cmd_args $length] eq "custom2"} {
84
+ emit_hook_log
85
+ puts "+++ some stuff here +++"
86
+ continue "custom2 timeline"
8287
} elseif {[lindex $::cmd_args $length] eq "now"} {
8388
emit_hook_log
8489
return "now timeline"
8590
} else {
8691
emit_hook_log
@@ -122,15 +127,21 @@
122127
123128
saveTh1SetupFile; writeTh1SetupFile $testTh1Setup
124129
125130
###############################################################################
126131
127
-fossil timeline custom; # NOTE: Bad "WHEN" argument.
132
+fossil timeline custom -expectError; # NOTE: Bad "WHEN" argument.
128133
test th1-cmd-hooks-1a {[normalize_result] eq \
134
+{<h1><b>command_hook timeline CUSTOM TIMELINE</b></h1>
135
+unknown check-in or invalid date: custom}}
136
+
137
+###############################################################################
138
+
139
+fossil timeline custom2; # NOTE: Bad "WHEN" argument.
140
+test th1-cmd-hooks-1b {[normalize_result] eq \
129141
{<h1><b>command_hook timeline</b></h1>
130
-+++ no more data (0) +++
131
-
++++ some stuff here +++
132142
<h1><b>command_hook timeline command_notify timeline</b></h1>}}
133143
134144
###############################################################################
135145
136146
fossil timeline
137147
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -75,12 +75,17 @@
75 return -code 2 "TH_RETURN return code"
76 } elseif {$::cmd_name eq "timeline"} {
77 set length [llength $::cmd_args]
78 set length [expr {$length - 1}]
79 if {[lindex $::cmd_args $length] eq "custom"} {
 
80 emit_hook_log
81 return "custom timeline"
 
 
 
 
82 } elseif {[lindex $::cmd_args $length] eq "now"} {
83 emit_hook_log
84 return "now timeline"
85 } else {
86 emit_hook_log
@@ -122,15 +127,21 @@
122
123 saveTh1SetupFile; writeTh1SetupFile $testTh1Setup
124
125 ###############################################################################
126
127 fossil timeline custom; # NOTE: Bad "WHEN" argument.
128 test th1-cmd-hooks-1a {[normalize_result] eq \
 
 
 
 
 
 
 
129 {<h1><b>command_hook timeline</b></h1>
130 +++ no more data (0) +++
131
++++ some stuff here +++
132 <h1><b>command_hook timeline command_notify timeline</b></h1>}}
133
134 ###############################################################################
135
136 fossil timeline
137
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -75,12 +75,17 @@
75 return -code 2 "TH_RETURN return code"
76 } elseif {$::cmd_name eq "timeline"} {
77 set length [llength $::cmd_args]
78 set length [expr {$length - 1}]
79 if {[lindex $::cmd_args $length] eq "custom"} {
80 append_hook_log "CUSTOM TIMELINE"
81 emit_hook_log
82 return "custom timeline"
83 } elseif {[lindex $::cmd_args $length] eq "custom2"} {
84 emit_hook_log
85 puts "+++ some stuff here +++"
86 continue "custom2 timeline"
87 } elseif {[lindex $::cmd_args $length] eq "now"} {
88 emit_hook_log
89 return "now timeline"
90 } else {
91 emit_hook_log
@@ -122,15 +127,21 @@
127
128 saveTh1SetupFile; writeTh1SetupFile $testTh1Setup
129
130 ###############################################################################
131
132 fossil timeline custom -expectError; # NOTE: Bad "WHEN" argument.
133 test th1-cmd-hooks-1a {[normalize_result] eq \
134 {<h1><b>command_hook timeline CUSTOM TIMELINE</b></h1>
135 unknown check-in or invalid date: custom}}
136
137 ###############################################################################
138
139 fossil timeline custom2; # NOTE: Bad "WHEN" argument.
140 test th1-cmd-hooks-1b {[normalize_result] eq \
141 {<h1><b>command_hook timeline</b></h1>
 
 
++++ some stuff here +++
142 <h1><b>command_hook timeline command_notify timeline</b></h1>}}
143
144 ###############################################################################
145
146 fossil timeline
147

Keyboard Shortcuts

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