Fossil SCM
Use join instead to avoid prepending garbage at the beginning of the string.
Commit
4d556700a71df910f09e0d4e2f8d091e6d1494fe5a4531b0e2a3233fe6838242
Parent
6d067c4f4d1aea4…
1 file changed
+1
-3
+1
-3
| --- test/amend.test | ||
| +++ test/amend.test | ||
| @@ -296,28 +296,26 @@ | ||
| 296 | 296 | set tc 0 |
| 297 | 297 | foreach {tagt result} $tagtests { |
| 298 | 298 | incr tc |
| 299 | 299 | set tags {} |
| 300 | 300 | set cancels {} |
| 301 | - set t1exp "" | |
| 301 | + set t1exp [join $results ", "] | |
| 302 | 302 | set t2exp "*" |
| 303 | 303 | set t3exp "*" |
| 304 | 304 | set t5exp "*" |
| 305 | 305 | foreach tag $tagt { |
| 306 | 306 | lappend tags -tag $tag |
| 307 | 307 | lappend cancels -cancel $tag |
| 308 | 308 | } |
| 309 | 309 | foreach res $result { |
| 310 | - append t1exp ", $res" | |
| 311 | 310 | append t3exp "Add*tag*\"$res\".*" |
| 312 | 311 | append t5exp "Cancel*tag*\"$res\".*" |
| 313 | 312 | } |
| 314 | 313 | foreach res [lsort -nocase $result] { |
| 315 | 314 | append t2exp "sym-$res*" |
| 316 | 315 | } |
| 317 | 316 | eval fossil amend $HASH $tags |
| 318 | - set t1exp [string trimleft $t1exp ,] | |
| 319 | 317 | test amend-tag-$tc.1 {[string match "*hash:*$HASH*tags:*$t1exp*" $RESULT]} |
| 320 | 318 | fossil tag ls --raw $HASH |
| 321 | 319 | test amend-tag-$tc.2 {[string match $t2exp $RESULT]} |
| 322 | 320 | fossil timeline -n 1 |
| 323 | 321 | test amend-tag-$tc.3 {[string match $t3exp $RESULT]} |
| 324 | 322 |
| --- test/amend.test | |
| +++ test/amend.test | |
| @@ -296,28 +296,26 @@ | |
| 296 | set tc 0 |
| 297 | foreach {tagt result} $tagtests { |
| 298 | incr tc |
| 299 | set tags {} |
| 300 | set cancels {} |
| 301 | set t1exp "" |
| 302 | set t2exp "*" |
| 303 | set t3exp "*" |
| 304 | set t5exp "*" |
| 305 | foreach tag $tagt { |
| 306 | lappend tags -tag $tag |
| 307 | lappend cancels -cancel $tag |
| 308 | } |
| 309 | foreach res $result { |
| 310 | append t1exp ", $res" |
| 311 | append t3exp "Add*tag*\"$res\".*" |
| 312 | append t5exp "Cancel*tag*\"$res\".*" |
| 313 | } |
| 314 | foreach res [lsort -nocase $result] { |
| 315 | append t2exp "sym-$res*" |
| 316 | } |
| 317 | eval fossil amend $HASH $tags |
| 318 | set t1exp [string trimleft $t1exp ,] |
| 319 | test amend-tag-$tc.1 {[string match "*hash:*$HASH*tags:*$t1exp*" $RESULT]} |
| 320 | fossil tag ls --raw $HASH |
| 321 | test amend-tag-$tc.2 {[string match $t2exp $RESULT]} |
| 322 | fossil timeline -n 1 |
| 323 | test amend-tag-$tc.3 {[string match $t3exp $RESULT]} |
| 324 |
| --- test/amend.test | |
| +++ test/amend.test | |
| @@ -296,28 +296,26 @@ | |
| 296 | set tc 0 |
| 297 | foreach {tagt result} $tagtests { |
| 298 | incr tc |
| 299 | set tags {} |
| 300 | set cancels {} |
| 301 | set t1exp [join $results ", "] |
| 302 | set t2exp "*" |
| 303 | set t3exp "*" |
| 304 | set t5exp "*" |
| 305 | foreach tag $tagt { |
| 306 | lappend tags -tag $tag |
| 307 | lappend cancels -cancel $tag |
| 308 | } |
| 309 | foreach res $result { |
| 310 | append t3exp "Add*tag*\"$res\".*" |
| 311 | append t5exp "Cancel*tag*\"$res\".*" |
| 312 | } |
| 313 | foreach res [lsort -nocase $result] { |
| 314 | append t2exp "sym-$res*" |
| 315 | } |
| 316 | eval fossil amend $HASH $tags |
| 317 | test amend-tag-$tc.1 {[string match "*hash:*$HASH*tags:*$t1exp*" $RESULT]} |
| 318 | fossil tag ls --raw $HASH |
| 319 | test amend-tag-$tc.2 {[string match $t2exp $RESULT]} |
| 320 | fossil timeline -n 1 |
| 321 | test amend-tag-$tc.3 {[string match $t3exp $RESULT]} |
| 322 |