Fossil SCM
Modify expected results for one of the TH1 hooks tests to account for the changes in [274e537bb064db9d].
Commit
6c1359d36715fb0c17ba74e186154e98ce9f53a4
Parent
561402f2e08045d…
1 file changed
+13
-3
+13
-3
| --- test/th1-hooks.test | ||
| +++ test/th1-hooks.test | ||
| @@ -75,12 +75,17 @@ | ||
| 75 | 75 | return -code 2 "TH_RETURN return code" |
| 76 | 76 | } elseif {$::cmd_name eq "timeline"} { |
| 77 | 77 | set length [llength $::cmd_args] |
| 78 | 78 | set length [expr {$length - 1}] |
| 79 | 79 | if {[lindex $::cmd_args $length] eq "custom"} { |
| 80 | + append_hook_log "CUSTOM TIMELINE" | |
| 80 | 81 | emit_hook_log |
| 81 | 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" | |
| 82 | 87 | } elseif {[lindex $::cmd_args $length] eq "now"} { |
| 83 | 88 | emit_hook_log |
| 84 | 89 | return "now timeline" |
| 85 | 90 | } else { |
| 86 | 91 | emit_hook_log |
| @@ -122,15 +127,21 @@ | ||
| 122 | 127 | |
| 123 | 128 | saveTh1SetupFile; writeTh1SetupFile $testTh1Setup |
| 124 | 129 | |
| 125 | 130 | ############################################################################### |
| 126 | 131 | |
| 127 | -fossil timeline custom; # NOTE: Bad "WHEN" argument. | |
| 132 | +fossil timeline custom -expectError; # NOTE: Bad "WHEN" argument. | |
| 128 | 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 \ | |
| 129 | 141 | {<h1><b>command_hook timeline</b></h1> |
| 130 | -+++ no more data (0) +++ | |
| 131 | - | |
| ++++ some stuff here +++ | ||
| 132 | 142 | <h1><b>command_hook timeline command_notify timeline</b></h1>}} |
| 133 | 143 | |
| 134 | 144 | ############################################################################### |
| 135 | 145 | |
| 136 | 146 | fossil timeline |
| 137 | 147 |
| --- 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 |