From 8de363f9d7ddd3df55df73b27a3a87cf7c9bd707 Mon Sep 17 00:00:00 2001 From: Erik Terpstra Date: Thu, 25 Jun 2020 11:20:25 +0200 Subject: Remove Match.number --- test/gleam/regex_test.gleam | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'test') 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")]), ], ) } -- cgit v1.2.3