Skip to content

Commit fe20132

Browse files
committed
pkg/regexp: delete duplicate test case in txtar
Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Ia61685e57a0c3512c0517f17dfd7a857b2760a67 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/532811 Unity-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
1 parent 8a2e832 commit fe20132

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

pkg/regexp/testdata/gen.txtar

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,42 @@ import "regexp"
66
t1: regexp.Find(#"f\w\w"#, "afoot")
77
t2: regexp.Find(#"f\w\w"#, "bar")
88
t3: regexp.FindAll(#"f\w\w"#, "afoot afloat from", 2)
9-
t4: regexp.FindAll(#"f\w\w"#, "afoot afloat from", 2)
10-
t5: regexp.FindAll(#"f\w\w"#, "bla bla", -1)
11-
t6: regexp.FindSubmatch(#"f(\w)(\w)"#, "afloat afoot from")
12-
t7: regexp.FindAllSubmatch(#"f(\w)(\w)"#, "afloat afoot from", -1)
13-
t8: regexp.FindAllSubmatch(#"f(\w)(\w)"#, "aglom", -1)
14-
t9: regexp.FindNamedSubmatch(#"f(?P<A>\w)(?P<B>\w)"#, "afloat afoot from")
15-
t10: regexp.FindAllNamedSubmatch(#"f(?P<A>\w)(?P<B>\w)"#, "afloat afoot from", -1)
16-
t11: regexp.FindAllNamedSubmatch(#"f(?P<A>optional)?"#, "fbla", -1)
17-
t12: regexp.FindAllNamedSubmatch(#"f(?P<A>\w)(?P<B>\w)"#, "aglom", -1)
18-
t13: regexp.Valid & "valid"
19-
t14: regexp.Valid & "invalid)"
9+
t4: regexp.FindAll(#"f\w\w"#, "bla bla", -1)
10+
t5: regexp.FindSubmatch(#"f(\w)(\w)"#, "afloat afoot from")
11+
t6: regexp.FindAllSubmatch(#"f(\w)(\w)"#, "afloat afoot from", -1)
12+
t7: regexp.FindAllSubmatch(#"f(\w)(\w)"#, "aglom", -1)
13+
t8: regexp.FindNamedSubmatch(#"f(?P<A>\w)(?P<B>\w)"#, "afloat afoot from")
14+
t9: regexp.FindAllNamedSubmatch(#"f(?P<A>\w)(?P<B>\w)"#, "afloat afoot from", -1)
15+
t10: regexp.FindAllNamedSubmatch(#"f(?P<A>optional)?"#, "fbla", -1)
16+
t11: regexp.FindAllNamedSubmatch(#"f(?P<A>\w)(?P<B>\w)"#, "aglom", -1)
17+
t12: regexp.Valid & "valid"
18+
t13: regexp.Valid & "invalid)"
2019
-- out/regexp --
2120
Errors:
22-
t14: invalid value "invalid)" (does not satisfy regexp.Valid): error in call to regexp.Valid: error parsing regexp: unexpected ): `invalid)`:
23-
./in.cue:16:21
21+
t13: invalid value "invalid)" (does not satisfy regexp.Valid): error in call to regexp.Valid: error parsing regexp: unexpected ): `invalid)`:
22+
./in.cue:15:21
2423
error in call to regexp.Find: no match:
2524
./in.cue:4:5
2625
error in call to regexp.FindAll: no match:
27-
./in.cue:7:5
26+
./in.cue:6:5
2827
error in call to regexp.FindAllSubmatch: no match:
29-
./in.cue:10:5
28+
./in.cue:9:5
3029
error in call to regexp.FindAllNamedSubmatch: no match:
31-
./in.cue:14:6
30+
./in.cue:13:6
3231

3332
Result:
3433
t1: "foo"
3534
t2: _|_ // error in call to regexp.Find: no match
3635
t3: ["foo", "flo"]
37-
t4: ["foo", "flo"]
38-
t5: _|_ // error in call to regexp.FindAll: no match
39-
t6: ["flo", "l", "o"]
40-
t7: [["flo", "l", "o"], ["foo", "o", "o"], ["fro", "r", "o"]]
41-
t8: _|_ // error in call to regexp.FindAllSubmatch: no match
42-
t9: {
36+
t4: _|_ // error in call to regexp.FindAll: no match
37+
t5: ["flo", "l", "o"]
38+
t6: [["flo", "l", "o"], ["foo", "o", "o"], ["fro", "r", "o"]]
39+
t7: _|_ // error in call to regexp.FindAllSubmatch: no match
40+
t8: {
4341
A: "l"
4442
B: "o"
4543
}
46-
t10: [{
44+
t9: [{
4745
A: "l"
4846
B: "o"
4947
}, {
@@ -53,10 +51,10 @@ t10: [{
5351
A: "r"
5452
B: "o"
5553
}]
56-
t11: [{
54+
t10: [{
5755
A: ""
5856
}]
59-
t12: _|_ // error in call to regexp.FindAllNamedSubmatch: no match
60-
t13: "valid"
61-
t14: _|_ // t14: invalid value "invalid)" (does not satisfy regexp.Valid): error in call to regexp.Valid: error parsing regexp: unexpected ): `invalid)`
57+
t11: _|_ // error in call to regexp.FindAllNamedSubmatch: no match
58+
t12: "valid"
59+
t13: _|_ // t13: invalid value "invalid)" (does not satisfy regexp.Valid): error in call to regexp.Valid: error parsing regexp: unexpected ): `invalid)`
6260

0 commit comments

Comments
 (0)