aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/regex/pire/ut/regexp_ut.cpp
diff options
context:
space:
mode:
authorRuslan Kovalev <ruslan.a.kovalev@gmail.com>2022-02-10 16:46:44 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:44 +0300
commit59e19371de37995fcb36beb16cd6ec030af960bc (patch)
treefa68e36093ebff8b805462e9e6d331fe9d348214 /library/cpp/regex/pire/ut/regexp_ut.cpp
parent89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (diff)
downloadydb-59e19371de37995fcb36beb16cd6ec030af960bc.tar.gz
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/regex/pire/ut/regexp_ut.cpp')
-rw-r--r--library/cpp/regex/pire/ut/regexp_ut.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/library/cpp/regex/pire/ut/regexp_ut.cpp b/library/cpp/regex/pire/ut/regexp_ut.cpp
index e7206de9ad..96b92bbc38 100644
--- a/library/cpp/regex/pire/ut/regexp_ut.cpp
+++ b/library/cpp/regex/pire/ut/regexp_ut.cpp
@@ -52,37 +52,37 @@ Y_UNIT_TEST_SUITE(TRegExp) {
UNIT_ASSERT(!TMatcher(TFsm("чзн", opts)).Match("чзх").Final());
}
- Y_UNIT_TEST(AndNot) {
- NRegExp::TFsmBase::TOptions opts;
- opts.AndNotSupport = true;
- {
- NRegExp::TFsm fsm(".*&~([0-9]*)", opts);
- UNIT_ASSERT(TMatcher(fsm).Match("a2").Final());
- UNIT_ASSERT(TMatcher(fsm).Match("ab").Final());
- UNIT_ASSERT(TMatcher(fsm).Match("1a").Final());
- UNIT_ASSERT(!TMatcher(fsm).Match("12").Final());
- }
- {
- NRegExp::TFsm fsm(".*&~(.*[0-9].*)", opts);
- UNIT_ASSERT(TMatcher(fsm).Match("ab").Final());
- UNIT_ASSERT(!TMatcher(fsm).Match("a2").Final());
- UNIT_ASSERT(!TMatcher(fsm).Match("1a").Final());
- UNIT_ASSERT(!TMatcher(fsm).Match("12").Final());
- }
- {
- NRegExp::TFsm fsm(
- "((([a-z0-9_\\-]+[.])*[a-z0-9_\\-]+)"
- "&~(\\d+[.]\\d+[.]\\d+[.]\\d+))(:\\d+)?",
- TFsm::TOptions().SetCaseInsensitive(true).SetAndNotSupport(true)
- );
- UNIT_ASSERT(TMatcher(fsm).Match("yandex.ru").Final());
- UNIT_ASSERT(TMatcher(fsm).Match("yandex").Final());
- UNIT_ASSERT(TMatcher(fsm).Match("yandex:80").Final());
- UNIT_ASSERT(!TMatcher(fsm).Match("127.0.0.1").Final());
- UNIT_ASSERT(!TMatcher(fsm).Match("127.0.0.1:8080").Final());
- }
- }
-
+ Y_UNIT_TEST(AndNot) {
+ NRegExp::TFsmBase::TOptions opts;
+ opts.AndNotSupport = true;
+ {
+ NRegExp::TFsm fsm(".*&~([0-9]*)", opts);
+ UNIT_ASSERT(TMatcher(fsm).Match("a2").Final());
+ UNIT_ASSERT(TMatcher(fsm).Match("ab").Final());
+ UNIT_ASSERT(TMatcher(fsm).Match("1a").Final());
+ UNIT_ASSERT(!TMatcher(fsm).Match("12").Final());
+ }
+ {
+ NRegExp::TFsm fsm(".*&~(.*[0-9].*)", opts);
+ UNIT_ASSERT(TMatcher(fsm).Match("ab").Final());
+ UNIT_ASSERT(!TMatcher(fsm).Match("a2").Final());
+ UNIT_ASSERT(!TMatcher(fsm).Match("1a").Final());
+ UNIT_ASSERT(!TMatcher(fsm).Match("12").Final());
+ }
+ {
+ NRegExp::TFsm fsm(
+ "((([a-z0-9_\\-]+[.])*[a-z0-9_\\-]+)"
+ "&~(\\d+[.]\\d+[.]\\d+[.]\\d+))(:\\d+)?",
+ TFsm::TOptions().SetCaseInsensitive(true).SetAndNotSupport(true)
+ );
+ UNIT_ASSERT(TMatcher(fsm).Match("yandex.ru").Final());
+ UNIT_ASSERT(TMatcher(fsm).Match("yandex").Final());
+ UNIT_ASSERT(TMatcher(fsm).Match("yandex:80").Final());
+ UNIT_ASSERT(!TMatcher(fsm).Match("127.0.0.1").Final());
+ UNIT_ASSERT(!TMatcher(fsm).Match("127.0.0.1:8080").Final());
+ }
+ }
+
Y_UNIT_TEST(Glue) {
TFsm glued =
TFsm("qw", TFsm::TOptions().SetCaseInsensitive(true)) |