diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-07-29 22:38:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 22:38:35 +0200 |
commit | 335fc2a94675de9c063743301fe4ce02bf344d63 (patch) | |
tree | 06828372baff3c374134fcebf068c54e287a6a1e /modules/regex/tests/test_regex.h | |
parent | 15a02c49be7f552eb79512cff7511144023cedbe (diff) | |
parent | db1270d521227010661fdb32c7bbf67f1e518992 (diff) |
Merge pull request #48183 from madmiraal/fix-regex-offset
Generate error if RegEx offset is negative
Diffstat (limited to 'modules/regex/tests/test_regex.h')
-rw-r--r-- | modules/regex/tests/test_regex.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/modules/regex/tests/test_regex.h b/modules/regex/tests/test_regex.h index 3f500e7b2f..91af393db1 100644 --- a/modules/regex/tests/test_regex.h +++ b/modules/regex/tests/test_regex.h @@ -130,16 +130,6 @@ TEST_CASE("[RegEx] Empty Pattern") { CHECK(re.is_valid()); } -TEST_CASE("[RegEx] Invalid offset") { - const String s = "Godot"; - - RegEx re("o"); - REQUIRE(re.is_valid()); - CHECK(re.search(s, -1) == nullptr); - CHECK(re.search_all(s, -1).size() == 0); - CHECK(re.sub(s, "", true, -1) == ""); -} - TEST_CASE("[RegEx] Invalid end position") { const String s = "Godot"; |