diff options
author | vitalyisaev <vitalyisaev@ydb.tech> | 2023-11-30 13:26:22 +0300 |
---|---|---|
committer | vitalyisaev <vitalyisaev@ydb.tech> | 2023-11-30 15:44:45 +0300 |
commit | 0a98fece5a9b54f16afeb3a94b3eb3105e9c3962 (patch) | |
tree | 291d72dbd7e9865399f668c84d11ed86fb190bbf /contrib/python/pyre2/py2/tests/test_findall.txt | |
parent | cb2c8d75065e5b3c47094067cb4aa407d4813298 (diff) | |
download | ydb-0a98fece5a9b54f16afeb3a94b3eb3105e9c3962.tar.gz |
YQ Connector:Use docker-compose in integrational tests
Diffstat (limited to 'contrib/python/pyre2/py2/tests/test_findall.txt')
-rw-r--r-- | contrib/python/pyre2/py2/tests/test_findall.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/contrib/python/pyre2/py2/tests/test_findall.txt b/contrib/python/pyre2/py2/tests/test_findall.txt new file mode 100644 index 0000000000..c753b936df --- /dev/null +++ b/contrib/python/pyre2/py2/tests/test_findall.txt @@ -0,0 +1,42 @@ +findall tests +============= + + >>> import re2 + >>> re2.set_fallback_notification(re2.FALLBACK_EXCEPTION) + +This one is from http://docs.python.org/library/re.html?#finding-all-adverbs: + + >>> re2.findall(r"\w+ly", "He was carefully disguised but captured quickly by police.") + ['carefully', 'quickly'] + +This one makes sure all groups are found: + + >>> re2.findall(r"(\w+)=(\d+)", "foo=1,foo=2") + [('foo', '1'), ('foo', '2')] + +When there's only one matched group, it should not be returned in a tuple: + + >>> re2.findall(r"(\w)\w", "fx") + ['f'] + +Zero matches is an empty list: + + >>> re2.findall("(f)", "gggg") + [] + +If pattern matches an empty string, do it only once at the end: + + >>> re2.findall(".*", "foo") + ['foo', ''] + + >>> re2.findall("", "foo") + ['', '', '', ''] + + + >>> import re + >>> re.findall(r'\b', 'The quick brown fox jumped over the lazy dog') + ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''] + >>> re2.findall(r'\b', 'The quick brown fox jumped over the lazy dog') + ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''] + + >>> re2.set_fallback_notification(re2.FALLBACK_QUIETLY) |