From 312e369f74edc3f2785a3959595892dbc2396092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Thu, 1 Dec 2022 00:30:47 +0100 Subject: [PATCH] Add missing positive spec for `Regex#match` with option (#12804) --- spec/std/regex_spec.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/std/regex_spec.cr b/spec/std/regex_spec.cr index 24ac68b35f9a..c38194bc8785 100644 --- a/spec/std/regex_spec.cr +++ b/spec/std/regex_spec.cr @@ -76,6 +76,7 @@ describe "Regex" do it "with options" do /foo/.match(".foo", options: Regex::Options::ANCHORED).should be_nil + /foo/.match("foo", options: Regex::Options::ANCHORED).should_not be_nil end end @@ -126,6 +127,7 @@ describe "Regex" do it "with options" do /foo/.match_at_byte_index("..foo", 1, options: Regex::Options::ANCHORED).should be_nil + /foo/.match_at_byte_index(".foo", 1, options: Regex::Options::ANCHORED).should_not be_nil end end @@ -195,6 +197,7 @@ describe "Regex" do it "with options" do /foo/.matches?(".foo", options: Regex::Options::ANCHORED).should be_false + /foo/.matches?("foo", options: Regex::Options::ANCHORED).should be_true end it "matches a large single line string" do @@ -229,6 +232,7 @@ describe "Regex" do it "with options" do /foo/.matches_at_byte_index?("..foo", 1, options: Regex::Options::ANCHORED).should be_false + /foo/.matches_at_byte_index?(".foo", 1, options: Regex::Options::ANCHORED).should be_true end end