Fossil SCM

Fixed amend.test to only care about the first 40 chars of uuid values.

rberteig 2017-03-15 06:25 trunk
Commit 3537c75cc3c9bdc018a9209dcd2a1c98c8baea3b93438c9f6d9ebb5d6b9c7c1e
1 file changed +6 -6
+6 -6
--- test/amend.test
+++ test/amend.test
@@ -27,23 +27,23 @@
2727
string map [list { } {\\s} \n {\\n} \r {\\r}] $comment
2828
}
2929
3030
proc uuid_from_commit {res var} {
3131
upvar $var UUID
32
- regexp {^New_Version: ([0-9a-f]{40,64})$} $res m UUID
32
+ regexp {^New_Version: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID
3333
}
3434
3535
proc uuid_from_branch {res var} {
3636
upvar $var UUID
37
- regexp {^New branch: ([0-9a-f]{40,64})$} $res m UUID
37
+ regexp {^New branch: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID
3838
}
3939
4040
proc uuid_from_checkout {var} {
4141
global RESULT
4242
upvar $var UUID
4343
fossil status
44
- regexp {checkout:\s+([0-9a-f]{40,64})} $RESULT m UUID
44
+ regexp {checkout:\s+([0-9a-f]{40})} $RESULT m UUID
4545
}
4646
4747
# Make sure we are not in an open repository and initialize new repository
4848
test_setup
4949
@@ -113,11 +113,11 @@
113113
[string match "*Change*background*color*to*\"$result\"*" $RESULT]
114114
}
115115
if {[artifact_from_timeline $RESULT artid]} {
116116
fossil artifact $artid
117117
test amend-bgcolor-1.$tc.d {
118
- [string match "*T +bgcolor $UUID $result*" $RESULT]
118
+ [string match "*T +bgcolor $UUID* $result*" $RESULT]
119119
}
120120
} else {
121121
if {$VERBOSE} { protOut "No artifact found in timeline output" }
122122
test amend-bgcolor-1.$tc.d false
123123
}
@@ -157,11 +157,11 @@
157157
[string match {*Change*branch*background*color*to*"yellow".*} $RESULT]
158158
}
159159
if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} {
160160
fossil artifact $artid
161161
test amend-branchcolor-1.4 {
162
- [string match "*T \*bgcolor $UUID2 yellow*" $RESULT]
162
+ [string match "*T \*bgcolor $UUID2* yellow*" $RESULT]
163163
}
164164
} else {
165165
if {$VERBOSE} { protOut "No artifact found in timeline output" }
166166
test amend-branchcolor-1.4 false
167167
}
@@ -347,11 +347,11 @@
347347
}
348348
fossil timeline -n 1
349349
if {[artifact_from_timeline $RESULT artid]} {
350350
fossil artifact $artid
351351
test amend-comment-$name.2 {
352
- [string match "*T +comment $UUID *[manifest_comment $comment]*" $RESULT]
352
+ [string match "*T +comment $UUID* *[manifest_comment $comment]*" $RESULT]
353353
}
354354
} else {
355355
if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" }
356356
test amend-comment-$name.2 false
357357
}
358358
--- test/amend.test
+++ test/amend.test
@@ -27,23 +27,23 @@
27 string map [list { } {\\s} \n {\\n} \r {\\r}] $comment
28 }
29
30 proc uuid_from_commit {res var} {
31 upvar $var UUID
32 regexp {^New_Version: ([0-9a-f]{40,64})$} $res m UUID
33 }
34
35 proc uuid_from_branch {res var} {
36 upvar $var UUID
37 regexp {^New branch: ([0-9a-f]{40,64})$} $res m UUID
38 }
39
40 proc uuid_from_checkout {var} {
41 global RESULT
42 upvar $var UUID
43 fossil status
44 regexp {checkout:\s+([0-9a-f]{40,64})} $RESULT m UUID
45 }
46
47 # Make sure we are not in an open repository and initialize new repository
48 test_setup
49
@@ -113,11 +113,11 @@
113 [string match "*Change*background*color*to*\"$result\"*" $RESULT]
114 }
115 if {[artifact_from_timeline $RESULT artid]} {
116 fossil artifact $artid
117 test amend-bgcolor-1.$tc.d {
118 [string match "*T +bgcolor $UUID $result*" $RESULT]
119 }
120 } else {
121 if {$VERBOSE} { protOut "No artifact found in timeline output" }
122 test amend-bgcolor-1.$tc.d false
123 }
@@ -157,11 +157,11 @@
157 [string match {*Change*branch*background*color*to*"yellow".*} $RESULT]
158 }
159 if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} {
160 fossil artifact $artid
161 test amend-branchcolor-1.4 {
162 [string match "*T \*bgcolor $UUID2 yellow*" $RESULT]
163 }
164 } else {
165 if {$VERBOSE} { protOut "No artifact found in timeline output" }
166 test amend-branchcolor-1.4 false
167 }
@@ -347,11 +347,11 @@
347 }
348 fossil timeline -n 1
349 if {[artifact_from_timeline $RESULT artid]} {
350 fossil artifact $artid
351 test amend-comment-$name.2 {
352 [string match "*T +comment $UUID *[manifest_comment $comment]*" $RESULT]
353 }
354 } else {
355 if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" }
356 test amend-comment-$name.2 false
357 }
358
--- test/amend.test
+++ test/amend.test
@@ -27,23 +27,23 @@
27 string map [list { } {\\s} \n {\\n} \r {\\r}] $comment
28 }
29
30 proc uuid_from_commit {res var} {
31 upvar $var UUID
32 regexp {^New_Version: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID
33 }
34
35 proc uuid_from_branch {res var} {
36 upvar $var UUID
37 regexp {^New branch: ([0-9a-f]{40})[0-9a-f]*$} $res m UUID
38 }
39
40 proc uuid_from_checkout {var} {
41 global RESULT
42 upvar $var UUID
43 fossil status
44 regexp {checkout:\s+([0-9a-f]{40})} $RESULT m UUID
45 }
46
47 # Make sure we are not in an open repository and initialize new repository
48 test_setup
49
@@ -113,11 +113,11 @@
113 [string match "*Change*background*color*to*\"$result\"*" $RESULT]
114 }
115 if {[artifact_from_timeline $RESULT artid]} {
116 fossil artifact $artid
117 test amend-bgcolor-1.$tc.d {
118 [string match "*T +bgcolor $UUID* $result*" $RESULT]
119 }
120 } else {
121 if {$VERBOSE} { protOut "No artifact found in timeline output" }
122 test amend-bgcolor-1.$tc.d false
123 }
@@ -157,11 +157,11 @@
157 [string match {*Change*branch*background*color*to*"yellow".*} $RESULT]
158 }
159 if {[regexp {(?x)[0-9]{2}(?::[0-9]{2}){2}\s+\[([0-9a-f]+)]} $RESULT m artid]} {
160 fossil artifact $artid
161 test amend-branchcolor-1.4 {
162 [string match "*T \*bgcolor $UUID2* yellow*" $RESULT]
163 }
164 } else {
165 if {$VERBOSE} { protOut "No artifact found in timeline output" }
166 test amend-branchcolor-1.4 false
167 }
@@ -347,11 +347,11 @@
347 }
348 fossil timeline -n 1
349 if {[artifact_from_timeline $RESULT artid]} {
350 fossil artifact $artid
351 test amend-comment-$name.2 {
352 [string match "*T +comment $UUID* *[manifest_comment $comment]*" $RESULT]
353 }
354 } else {
355 if {$VERBOSE} { protOut "No artifact found in timeline output: $RESULT" }
356 test amend-comment-$name.2 false
357 }
358

Keyboard Shortcuts

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