diff options
author | Erik Terpstra <erterpstra@gmail.com> | 2020-06-25 11:20:25 +0200 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2020-06-25 14:31:57 +0100 |
commit | 8de363f9d7ddd3df55df73b27a3a87cf7c9bd707 (patch) | |
tree | ad2f3fbe34697ffe542573b552038bff2bae5bca /test | |
parent | 641c5050ed226ef9fc1dbbe35df579dcd2e504d3 (diff) | |
download | gleam_stdlib-8de363f9d7ddd3df55df73b27a3a87cf7c9bd707.tar.gz gleam_stdlib-8de363f9d7ddd3df55df73b27a3a87cf7c9bd707.zip |
Remove Match.number
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/regex_test.gleam | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/test/gleam/regex_test.gleam b/test/gleam/regex_test.gleam index fec4bd5..8f69fee 100644 --- a/test/gleam/regex_test.gleam +++ b/test/gleam/regex_test.gleam @@ -57,31 +57,21 @@ pub fn scan_test() { assert Ok(re) = regex.from_string("Gl\\w+") regex.scan(re, "!Gleam") - |> should.equal([Match(match: "Gleam", index: 1, number: 1, submatches: [])]) + |> should.equal([Match(match: "Gleam", index: 1, submatches: [])]) regex.scan(re, "हGleam") - |> should.equal([Match(match: "Gleam", index: 3, number: 1, submatches: [])]) + |> should.equal([Match(match: "Gleam", index: 3, submatches: [])]) regex.scan(re, "𐍈Gleam") - |> should.equal([Match(match: "Gleam", index: 4, number: 1, submatches: [])]) + |> should.equal([Match(match: "Gleam", index: 4, submatches: [])]) assert Ok(re) = regex.from_string("[oi]n a(.?) (\\w+)") regex.scan(re, "I am on a boat in a lake.") |> should.equal( [ - Match( - match: "on a boat", - index: 5, - number: 1, - submatches: [None, Some("boat")], - ), - Match( - match: "in a lake", - index: 15, - number: 2, - submatches: [None, Some("lake")], - ), + Match(match: "on a boat", index: 5, submatches: [None, Some("boat")]), + Match(match: "in a lake", index: 15, submatches: [None, Some("lake")]), ], ) } |