Fossil SCM
Updates to the 'amend' tests.
Commit
47f19d8eb0099cc1bc526e5e21e08bfe7bb9927d2f11379ed4c559eeb8d4f44e
Parent
547585be712f354…
1 file changed
+12
-15
+12
-15
| --- test/amend.test | ||
| +++ test/amend.test | ||
| @@ -103,11 +103,11 @@ | ||
| 103 | 103 | 1234 1234 |
| 104 | 104 | 123456 #123456 |
| 105 | 105 | } { |
| 106 | 106 | incr tc |
| 107 | 107 | fossil amend $HASH -bgcolor $color |
| 108 | - test amend-bgcolor-1.$tc.a {[string match "*uuid:*$HASH*" $RESULT]} | |
| 108 | + test amend-bgcolor-1.$tc.a {[string match "*hash:*$HASH*" $RESULT]} | |
| 109 | 109 | fossil tag list --raw $HASH |
| 110 | 110 | test amend-bgcolor-1.$tc.b {[string first "bgcolor=$result" $RESULT] != -1} |
| 111 | 111 | fossil timeline -n 1 |
| 112 | 112 | test amend-bgcolor-1.$tc.c { |
| 113 | 113 | [string match "*Change*background*color*to*\"$result\"*" $RESULT] |
| @@ -121,11 +121,11 @@ | ||
| 121 | 121 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 122 | 122 | test amend-bgcolor-1.$tc.d false |
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | fossil amend $HASH -bgcolor {} |
| 126 | -test amend-bgcolor-2.1 {[string match "*uuid:*$HASH*" $RESULT]} | |
| 126 | +test amend-bgcolor-2.1 {[string match "*hash:*$HASH*" $RESULT]} | |
| 127 | 127 | fossil tag list --raw $HASH |
| 128 | 128 | test amend-bgcolor-2.2 { |
| 129 | 129 | [string first "bgcolor=" $RESULT] == -1 && |
| 130 | 130 | [string first "bgcolor" $RESULT] != -1 |
| 131 | 131 | } |
| @@ -147,11 +147,11 @@ | ||
| 147 | 147 | if {![uuid_from_branch $RESULT HASH2]} { |
| 148 | 148 | test amend-branchcolor.setup false |
| 149 | 149 | } |
| 150 | 150 | fossil update $HASH2 |
| 151 | 151 | fossil amend $HASH2 -branchcolor yellow |
| 152 | -test amend-branchcolor-1.1 {[string match "*uuid:*$HASH2*" $RESULT]} | |
| 152 | +test amend-branchcolor-1.1 {[string match "*hash:*$HASH2*" $RESULT]} | |
| 153 | 153 | fossil tag ls --raw $HASH2 |
| 154 | 154 | test amend-branchcolor-1.2 {[string first "bgcolor=yellow" $RESULT] != -1} |
| 155 | 155 | fossil timeline -n 1 |
| 156 | 156 | test amend-branchcolor-1.3 { |
| 157 | 157 | [string match {*Change*branch*background*color*to*"yellow".*} $RESULT] |
| @@ -175,11 +175,11 @@ | ||
| 175 | 175 | write_file datafile "bc1" |
| 176 | 176 | fossil commit -m "mc1" |
| 177 | 177 | write_file datafile "bc2" |
| 178 | 178 | fossil commit -m "mc2" |
| 179 | 179 | fossil amend $HASHN -branchcolor deadbe |
| 180 | -test amend-branchcolor-2.1 {[string match "*uuid:*$HASHN*" $RESULT]} | |
| 180 | +test amend-branchcolor-2.1 {[string match "*hash:*$HASHN*" $RESULT]} | |
| 181 | 181 | fossil tag ls --raw current |
| 182 | 182 | test amend-branchcolor-2.2 {[string first "bgcolor=#deadbe" $RESULT] != -1} |
| 183 | 183 | fossil timeline -n 1 |
| 184 | 184 | test amend-branchcolor-2.3 { |
| 185 | 185 | [string match {*Change*branch*background*color*to*"#deadbe".*} $RESULT] |
| @@ -201,11 +201,11 @@ | ||
| 201 | 201 | set timestamp [clock scan yesterday] |
| 202 | 202 | set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1] |
| 203 | 203 | set time [clock format $timestamp -format "%H:%M:%S" -gmt 1] |
| 204 | 204 | set datetime "$date $time" |
| 205 | 205 | fossil amend $HASHINIT -date $datetime |
| 206 | -test amend-date-1.1 {[string match "*uuid:*$HASHINIT*$datetime*" $RESULT]} | |
| 206 | +test amend-date-1.1 {[string match "*hash:*$HASHINIT*$datetime*" $RESULT]} | |
| 207 | 207 | fossil tag ls --raw $HASHINIT |
| 208 | 208 | test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1} |
| 209 | 209 | fossil timeline -n 1 |
| 210 | 210 | test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]} |
| 211 | 211 | set badformats { |
| @@ -232,11 +232,11 @@ | ||
| 232 | 232 | fossil branch new tohide current |
| 233 | 233 | if {![uuid_from_branch $RESULT HASHH]} { |
| 234 | 234 | test amend-hide-setup false |
| 235 | 235 | } |
| 236 | 236 | fossil amend $HASHH -hide |
| 237 | -test amend-hide-1.1 {[string match "*uuid:*$HASHH*" $RESULT]} | |
| 237 | +test amend-hide-1.1 {[string match "*hash:*$HASHH*" $RESULT]} | |
| 238 | 238 | fossil tag ls --raw $HASHH |
| 239 | 239 | test amend-hide-1.2 {[string first "hidden" $RESULT] != -1} |
| 240 | 240 | fossil timeline -n 1 |
| 241 | 241 | test amend-hide-1.3 {[string match {*Add*propagating*"hidden".*} $RESULT]} |
| 242 | 242 | |
| @@ -248,11 +248,11 @@ | ||
| 248 | 248 | if {![uuid_from_branch $RESULT HASHC]} { |
| 249 | 249 | test amend-close.setup false |
| 250 | 250 | } |
| 251 | 251 | fossil update $HASHC |
| 252 | 252 | fossil amend $HASHC -close |
| 253 | -test amend-close-1.1.a {[string match "*uuid:*$HASHC*" $RESULT]} | |
| 253 | +test amend-close-1.1.a {[string match "*hash:*$HASHC*" $RESULT]} | |
| 254 | 254 | test amend-close-1.1.b { |
| 255 | 255 | [string match "*comment:*Create*new*branch*named*\"cllf\"*" $RESULT] |
| 256 | 256 | } |
| 257 | 257 | fossil tag ls --raw $HASHC |
| 258 | 258 | test amend-close-1.2 {[string first "closed" $RESULT] != -1} |
| @@ -273,11 +273,11 @@ | ||
| 273 | 273 | write_file datafile "b1" |
| 274 | 274 | fossil commit -m "m1" |
| 275 | 275 | write_file datafile "b2" |
| 276 | 276 | fossil commit -m "m2" |
| 277 | 277 | fossil amend $HASH3 --close |
| 278 | -test amend-close-3.1 {[string match "*uuid:*$HASH3*" $RESULT]} | |
| 278 | +test amend-close-3.1 {[string match "*hash:*$HASH3*" $RESULT]} | |
| 279 | 279 | fossil tag ls --raw current |
| 280 | 280 | test amend-close-3.2 {[string first "closed" $RESULT] != -1} |
| 281 | 281 | fossil timeline -n 1 |
| 282 | 282 | test amend-close-3.3 { |
| 283 | 283 | [string match "*Add*propagating*\"closed\".*" $RESULT] |
| @@ -311,11 +311,11 @@ | ||
| 311 | 311 | append t2exp "sym-$res*" |
| 312 | 312 | append t3exp "Add*tag*\"$res\".*" |
| 313 | 313 | append t5exp "Cancel*tag*\"$res\".*" |
| 314 | 314 | } |
| 315 | 315 | eval fossil amend $HASH $tags |
| 316 | - test amend-tag-$tc.1 {[string match "*uuid:*$HASH*tags:*$t1exp*" $RESULT]} | |
| 316 | + test amend-tag-$tc.1 {[string match "*hash:*$HASH*tags:*$t1exp*" $RESULT]} | |
| 317 | 317 | fossil tag ls --raw $HASH |
| 318 | 318 | test amend-tag-$tc.2 {[string match $t2exp $RESULT]} |
| 319 | 319 | fossil timeline -n 1 |
| 320 | 320 | test amend-tag-$tc.3 {[string match $t3exp $RESULT]} |
| 321 | 321 | eval fossil amend $HASH $cancels |
| @@ -341,11 +341,11 @@ | ||
| 341 | 341 | |
| 342 | 342 | proc test-comment {name HASH comment} { |
| 343 | 343 | global VERBOSE RESULT |
| 344 | 344 | |
| 345 | 345 | test amend-comment-$name.1 { |
| 346 | - [string match "*uuid:*$HASH*comment:*$comment*" $RESULT] | |
| 346 | + [string match "*hash:*$HASH*comment:*$comment*" $RESULT] | |
| 347 | 347 | } |
| 348 | 348 | fossil timeline -n 1 |
| 349 | 349 | if {[artifact_from_timeline $RESULT artid]} { |
| 350 | 350 | fossil artifact $artid |
| 351 | 351 | test amend-comment-$name.2 { |
| @@ -359,11 +359,11 @@ | ||
| 359 | 359 | test amend-comment-$name.3 { |
| 360 | 360 | [string match "*[short_uuid $HASH]*Edit*check-in*comment.*" $RESULT] |
| 361 | 361 | } |
| 362 | 362 | fossil info $HASH |
| 363 | 363 | test amend-comment-$name.4 { |
| 364 | - [string match "*uuid:*$HASH*comment:*$comment*" $RESULT] | |
| 364 | + [string match "*hash:*$HASH*comment:*$comment*" $RESULT] | |
| 365 | 365 | } |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | prep-test "revision 1" "revision 1" |
| 369 | 369 | fossil amend $HASH -comment "revised revision 1" |
| @@ -382,14 +382,11 @@ | ||
| 382 | 382 | write_file commitmsg "revision 4 revised with -M" |
| 383 | 383 | fossil amend $HASH -M commitmsg |
| 384 | 384 | test-comment 4 $HASH "revision 4 revised with -M" |
| 385 | 385 | |
| 386 | 386 | prep-test "final comment" "final content" |
| 387 | -if {[catch {exec which ed} result]} { | |
| 388 | - if {$VERBOSE} { protOut "Install ed for interactive comment test: $result" } | |
| 389 | - test-comment 5 $HASH "ed required for interactive edit" | |
| 390 | -} else { | |
| 387 | +if {[catch {exec which ed} result] == 0} { | |
| 391 | 388 | fossil settings editor "ed -s" |
| 392 | 389 | set comment "interactive edited comment" |
| 393 | 390 | fossil_maybe_answer "a\n$comment\n.\nw\nq\n" amend $HASH --edit-comment |
| 394 | 391 | test-comment 5 $HASH $comment |
| 395 | 392 | } |
| 396 | 393 |
| --- test/amend.test | |
| +++ test/amend.test | |
| @@ -103,11 +103,11 @@ | |
| 103 | 1234 1234 |
| 104 | 123456 #123456 |
| 105 | } { |
| 106 | incr tc |
| 107 | fossil amend $HASH -bgcolor $color |
| 108 | test amend-bgcolor-1.$tc.a {[string match "*uuid:*$HASH*" $RESULT]} |
| 109 | fossil tag list --raw $HASH |
| 110 | test amend-bgcolor-1.$tc.b {[string first "bgcolor=$result" $RESULT] != -1} |
| 111 | fossil timeline -n 1 |
| 112 | test amend-bgcolor-1.$tc.c { |
| 113 | [string match "*Change*background*color*to*\"$result\"*" $RESULT] |
| @@ -121,11 +121,11 @@ | |
| 121 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 122 | test amend-bgcolor-1.$tc.d false |
| 123 | } |
| 124 | } |
| 125 | fossil amend $HASH -bgcolor {} |
| 126 | test amend-bgcolor-2.1 {[string match "*uuid:*$HASH*" $RESULT]} |
| 127 | fossil tag list --raw $HASH |
| 128 | test amend-bgcolor-2.2 { |
| 129 | [string first "bgcolor=" $RESULT] == -1 && |
| 130 | [string first "bgcolor" $RESULT] != -1 |
| 131 | } |
| @@ -147,11 +147,11 @@ | |
| 147 | if {![uuid_from_branch $RESULT HASH2]} { |
| 148 | test amend-branchcolor.setup false |
| 149 | } |
| 150 | fossil update $HASH2 |
| 151 | fossil amend $HASH2 -branchcolor yellow |
| 152 | test amend-branchcolor-1.1 {[string match "*uuid:*$HASH2*" $RESULT]} |
| 153 | fossil tag ls --raw $HASH2 |
| 154 | test amend-branchcolor-1.2 {[string first "bgcolor=yellow" $RESULT] != -1} |
| 155 | fossil timeline -n 1 |
| 156 | test amend-branchcolor-1.3 { |
| 157 | [string match {*Change*branch*background*color*to*"yellow".*} $RESULT] |
| @@ -175,11 +175,11 @@ | |
| 175 | write_file datafile "bc1" |
| 176 | fossil commit -m "mc1" |
| 177 | write_file datafile "bc2" |
| 178 | fossil commit -m "mc2" |
| 179 | fossil amend $HASHN -branchcolor deadbe |
| 180 | test amend-branchcolor-2.1 {[string match "*uuid:*$HASHN*" $RESULT]} |
| 181 | fossil tag ls --raw current |
| 182 | test amend-branchcolor-2.2 {[string first "bgcolor=#deadbe" $RESULT] != -1} |
| 183 | fossil timeline -n 1 |
| 184 | test amend-branchcolor-2.3 { |
| 185 | [string match {*Change*branch*background*color*to*"#deadbe".*} $RESULT] |
| @@ -201,11 +201,11 @@ | |
| 201 | set timestamp [clock scan yesterday] |
| 202 | set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1] |
| 203 | set time [clock format $timestamp -format "%H:%M:%S" -gmt 1] |
| 204 | set datetime "$date $time" |
| 205 | fossil amend $HASHINIT -date $datetime |
| 206 | test amend-date-1.1 {[string match "*uuid:*$HASHINIT*$datetime*" $RESULT]} |
| 207 | fossil tag ls --raw $HASHINIT |
| 208 | test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1} |
| 209 | fossil timeline -n 1 |
| 210 | test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]} |
| 211 | set badformats { |
| @@ -232,11 +232,11 @@ | |
| 232 | fossil branch new tohide current |
| 233 | if {![uuid_from_branch $RESULT HASHH]} { |
| 234 | test amend-hide-setup false |
| 235 | } |
| 236 | fossil amend $HASHH -hide |
| 237 | test amend-hide-1.1 {[string match "*uuid:*$HASHH*" $RESULT]} |
| 238 | fossil tag ls --raw $HASHH |
| 239 | test amend-hide-1.2 {[string first "hidden" $RESULT] != -1} |
| 240 | fossil timeline -n 1 |
| 241 | test amend-hide-1.3 {[string match {*Add*propagating*"hidden".*} $RESULT]} |
| 242 | |
| @@ -248,11 +248,11 @@ | |
| 248 | if {![uuid_from_branch $RESULT HASHC]} { |
| 249 | test amend-close.setup false |
| 250 | } |
| 251 | fossil update $HASHC |
| 252 | fossil amend $HASHC -close |
| 253 | test amend-close-1.1.a {[string match "*uuid:*$HASHC*" $RESULT]} |
| 254 | test amend-close-1.1.b { |
| 255 | [string match "*comment:*Create*new*branch*named*\"cllf\"*" $RESULT] |
| 256 | } |
| 257 | fossil tag ls --raw $HASHC |
| 258 | test amend-close-1.2 {[string first "closed" $RESULT] != -1} |
| @@ -273,11 +273,11 @@ | |
| 273 | write_file datafile "b1" |
| 274 | fossil commit -m "m1" |
| 275 | write_file datafile "b2" |
| 276 | fossil commit -m "m2" |
| 277 | fossil amend $HASH3 --close |
| 278 | test amend-close-3.1 {[string match "*uuid:*$HASH3*" $RESULT]} |
| 279 | fossil tag ls --raw current |
| 280 | test amend-close-3.2 {[string first "closed" $RESULT] != -1} |
| 281 | fossil timeline -n 1 |
| 282 | test amend-close-3.3 { |
| 283 | [string match "*Add*propagating*\"closed\".*" $RESULT] |
| @@ -311,11 +311,11 @@ | |
| 311 | append t2exp "sym-$res*" |
| 312 | append t3exp "Add*tag*\"$res\".*" |
| 313 | append t5exp "Cancel*tag*\"$res\".*" |
| 314 | } |
| 315 | eval fossil amend $HASH $tags |
| 316 | test amend-tag-$tc.1 {[string match "*uuid:*$HASH*tags:*$t1exp*" $RESULT]} |
| 317 | fossil tag ls --raw $HASH |
| 318 | test amend-tag-$tc.2 {[string match $t2exp $RESULT]} |
| 319 | fossil timeline -n 1 |
| 320 | test amend-tag-$tc.3 {[string match $t3exp $RESULT]} |
| 321 | eval fossil amend $HASH $cancels |
| @@ -341,11 +341,11 @@ | |
| 341 | |
| 342 | proc test-comment {name HASH comment} { |
| 343 | global VERBOSE RESULT |
| 344 | |
| 345 | test amend-comment-$name.1 { |
| 346 | [string match "*uuid:*$HASH*comment:*$comment*" $RESULT] |
| 347 | } |
| 348 | fossil timeline -n 1 |
| 349 | if {[artifact_from_timeline $RESULT artid]} { |
| 350 | fossil artifact $artid |
| 351 | test amend-comment-$name.2 { |
| @@ -359,11 +359,11 @@ | |
| 359 | test amend-comment-$name.3 { |
| 360 | [string match "*[short_uuid $HASH]*Edit*check-in*comment.*" $RESULT] |
| 361 | } |
| 362 | fossil info $HASH |
| 363 | test amend-comment-$name.4 { |
| 364 | [string match "*uuid:*$HASH*comment:*$comment*" $RESULT] |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | prep-test "revision 1" "revision 1" |
| 369 | fossil amend $HASH -comment "revised revision 1" |
| @@ -382,14 +382,11 @@ | |
| 382 | write_file commitmsg "revision 4 revised with -M" |
| 383 | fossil amend $HASH -M commitmsg |
| 384 | test-comment 4 $HASH "revision 4 revised with -M" |
| 385 | |
| 386 | prep-test "final comment" "final content" |
| 387 | if {[catch {exec which ed} result]} { |
| 388 | if {$VERBOSE} { protOut "Install ed for interactive comment test: $result" } |
| 389 | test-comment 5 $HASH "ed required for interactive edit" |
| 390 | } else { |
| 391 | fossil settings editor "ed -s" |
| 392 | set comment "interactive edited comment" |
| 393 | fossil_maybe_answer "a\n$comment\n.\nw\nq\n" amend $HASH --edit-comment |
| 394 | test-comment 5 $HASH $comment |
| 395 | } |
| 396 |
| --- test/amend.test | |
| +++ test/amend.test | |
| @@ -103,11 +103,11 @@ | |
| 103 | 1234 1234 |
| 104 | 123456 #123456 |
| 105 | } { |
| 106 | incr tc |
| 107 | fossil amend $HASH -bgcolor $color |
| 108 | test amend-bgcolor-1.$tc.a {[string match "*hash:*$HASH*" $RESULT]} |
| 109 | fossil tag list --raw $HASH |
| 110 | test amend-bgcolor-1.$tc.b {[string first "bgcolor=$result" $RESULT] != -1} |
| 111 | fossil timeline -n 1 |
| 112 | test amend-bgcolor-1.$tc.c { |
| 113 | [string match "*Change*background*color*to*\"$result\"*" $RESULT] |
| @@ -121,11 +121,11 @@ | |
| 121 | if {$VERBOSE} { protOut "No artifact found in timeline output" } |
| 122 | test amend-bgcolor-1.$tc.d false |
| 123 | } |
| 124 | } |
| 125 | fossil amend $HASH -bgcolor {} |
| 126 | test amend-bgcolor-2.1 {[string match "*hash:*$HASH*" $RESULT]} |
| 127 | fossil tag list --raw $HASH |
| 128 | test amend-bgcolor-2.2 { |
| 129 | [string first "bgcolor=" $RESULT] == -1 && |
| 130 | [string first "bgcolor" $RESULT] != -1 |
| 131 | } |
| @@ -147,11 +147,11 @@ | |
| 147 | if {![uuid_from_branch $RESULT HASH2]} { |
| 148 | test amend-branchcolor.setup false |
| 149 | } |
| 150 | fossil update $HASH2 |
| 151 | fossil amend $HASH2 -branchcolor yellow |
| 152 | test amend-branchcolor-1.1 {[string match "*hash:*$HASH2*" $RESULT]} |
| 153 | fossil tag ls --raw $HASH2 |
| 154 | test amend-branchcolor-1.2 {[string first "bgcolor=yellow" $RESULT] != -1} |
| 155 | fossil timeline -n 1 |
| 156 | test amend-branchcolor-1.3 { |
| 157 | [string match {*Change*branch*background*color*to*"yellow".*} $RESULT] |
| @@ -175,11 +175,11 @@ | |
| 175 | write_file datafile "bc1" |
| 176 | fossil commit -m "mc1" |
| 177 | write_file datafile "bc2" |
| 178 | fossil commit -m "mc2" |
| 179 | fossil amend $HASHN -branchcolor deadbe |
| 180 | test amend-branchcolor-2.1 {[string match "*hash:*$HASHN*" $RESULT]} |
| 181 | fossil tag ls --raw current |
| 182 | test amend-branchcolor-2.2 {[string first "bgcolor=#deadbe" $RESULT] != -1} |
| 183 | fossil timeline -n 1 |
| 184 | test amend-branchcolor-2.3 { |
| 185 | [string match {*Change*branch*background*color*to*"#deadbe".*} $RESULT] |
| @@ -201,11 +201,11 @@ | |
| 201 | set timestamp [clock scan yesterday] |
| 202 | set date [clock format $timestamp -format "%Y-%m-%d" -gmt 1] |
| 203 | set time [clock format $timestamp -format "%H:%M:%S" -gmt 1] |
| 204 | set datetime "$date $time" |
| 205 | fossil amend $HASHINIT -date $datetime |
| 206 | test amend-date-1.1 {[string match "*hash:*$HASHINIT*$datetime*" $RESULT]} |
| 207 | fossil tag ls --raw $HASHINIT |
| 208 | test amend-date-1.2 {[string first "date=$datetime" $RESULT] != -1} |
| 209 | fossil timeline -n 1 |
| 210 | test amend-date-1.3 {[string match "*Timestamp*$date*$time*" $RESULT]} |
| 211 | set badformats { |
| @@ -232,11 +232,11 @@ | |
| 232 | fossil branch new tohide current |
| 233 | if {![uuid_from_branch $RESULT HASHH]} { |
| 234 | test amend-hide-setup false |
| 235 | } |
| 236 | fossil amend $HASHH -hide |
| 237 | test amend-hide-1.1 {[string match "*hash:*$HASHH*" $RESULT]} |
| 238 | fossil tag ls --raw $HASHH |
| 239 | test amend-hide-1.2 {[string first "hidden" $RESULT] != -1} |
| 240 | fossil timeline -n 1 |
| 241 | test amend-hide-1.3 {[string match {*Add*propagating*"hidden".*} $RESULT]} |
| 242 | |
| @@ -248,11 +248,11 @@ | |
| 248 | if {![uuid_from_branch $RESULT HASHC]} { |
| 249 | test amend-close.setup false |
| 250 | } |
| 251 | fossil update $HASHC |
| 252 | fossil amend $HASHC -close |
| 253 | test amend-close-1.1.a {[string match "*hash:*$HASHC*" $RESULT]} |
| 254 | test amend-close-1.1.b { |
| 255 | [string match "*comment:*Create*new*branch*named*\"cllf\"*" $RESULT] |
| 256 | } |
| 257 | fossil tag ls --raw $HASHC |
| 258 | test amend-close-1.2 {[string first "closed" $RESULT] != -1} |
| @@ -273,11 +273,11 @@ | |
| 273 | write_file datafile "b1" |
| 274 | fossil commit -m "m1" |
| 275 | write_file datafile "b2" |
| 276 | fossil commit -m "m2" |
| 277 | fossil amend $HASH3 --close |
| 278 | test amend-close-3.1 {[string match "*hash:*$HASH3*" $RESULT]} |
| 279 | fossil tag ls --raw current |
| 280 | test amend-close-3.2 {[string first "closed" $RESULT] != -1} |
| 281 | fossil timeline -n 1 |
| 282 | test amend-close-3.3 { |
| 283 | [string match "*Add*propagating*\"closed\".*" $RESULT] |
| @@ -311,11 +311,11 @@ | |
| 311 | append t2exp "sym-$res*" |
| 312 | append t3exp "Add*tag*\"$res\".*" |
| 313 | append t5exp "Cancel*tag*\"$res\".*" |
| 314 | } |
| 315 | eval fossil amend $HASH $tags |
| 316 | test amend-tag-$tc.1 {[string match "*hash:*$HASH*tags:*$t1exp*" $RESULT]} |
| 317 | fossil tag ls --raw $HASH |
| 318 | test amend-tag-$tc.2 {[string match $t2exp $RESULT]} |
| 319 | fossil timeline -n 1 |
| 320 | test amend-tag-$tc.3 {[string match $t3exp $RESULT]} |
| 321 | eval fossil amend $HASH $cancels |
| @@ -341,11 +341,11 @@ | |
| 341 | |
| 342 | proc test-comment {name HASH comment} { |
| 343 | global VERBOSE RESULT |
| 344 | |
| 345 | test amend-comment-$name.1 { |
| 346 | [string match "*hash:*$HASH*comment:*$comment*" $RESULT] |
| 347 | } |
| 348 | fossil timeline -n 1 |
| 349 | if {[artifact_from_timeline $RESULT artid]} { |
| 350 | fossil artifact $artid |
| 351 | test amend-comment-$name.2 { |
| @@ -359,11 +359,11 @@ | |
| 359 | test amend-comment-$name.3 { |
| 360 | [string match "*[short_uuid $HASH]*Edit*check-in*comment.*" $RESULT] |
| 361 | } |
| 362 | fossil info $HASH |
| 363 | test amend-comment-$name.4 { |
| 364 | [string match "*hash:*$HASH*comment:*$comment*" $RESULT] |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | prep-test "revision 1" "revision 1" |
| 369 | fossil amend $HASH -comment "revised revision 1" |
| @@ -382,14 +382,11 @@ | |
| 382 | write_file commitmsg "revision 4 revised with -M" |
| 383 | fossil amend $HASH -M commitmsg |
| 384 | test-comment 4 $HASH "revision 4 revised with -M" |
| 385 | |
| 386 | prep-test "final comment" "final content" |
| 387 | if {[catch {exec which ed} result] == 0} { |
| 388 | fossil settings editor "ed -s" |
| 389 | set comment "interactive edited comment" |
| 390 | fossil_maybe_answer "a\n$comment\n.\nw\nq\n" amend $HASH --edit-comment |
| 391 | test-comment 5 $HASH $comment |
| 392 | } |
| 393 |