Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
06c0ec94
Kaydet (Commit)
06c0ec94
authored
Tem 17, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Several additions from Jeffrey.
üst
23b22574
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
re_tests.py
Lib/test/re_tests.py
+22
-5
No files found.
Lib/test/re_tests.py
Dosyayı görüntüle @
06c0ec94
...
...
@@ -272,7 +272,7 @@ tests = [
(
'(a)b(c)'
,
'abc'
,
SUCCEED
,
'found+"-"+g1+"-"+g2'
,
'abc-a-c'
),
(
'a+b+c'
,
'aabbabc'
,
SUCCEED
,
'found'
,
'abc'
),
(
'a{1,}b{1,}c'
,
'aabbabc'
,
SUCCEED
,
'found'
,
'abc'
),
#
('a**', '-', SYNTAX_ERROR),
(
'a**'
,
'-'
,
SYNTAX_ERROR
),
(
'a.+?c'
,
'abcabc'
,
SUCCEED
,
'found'
,
'abc'
),
(
'(a+|b)*'
,
'ab'
,
SUCCEED
,
'found+"-"+g1'
,
'ab-b'
),
(
'(a+|b){0,}'
,
'ab'
,
SUCCEED
,
'found+"-"+g1'
,
'ab-b'
),
...
...
@@ -317,6 +317,7 @@ tests = [
# Python does not have the same rules for \\41 so this is a syntax error
# ('((((((((((a))))))))))\\41', 'aa', FAIL),
# ('((((((((((a))))))))))\\41', 'a!', SUCCEED, 'found', 'a!'),
(
'((((((((((a))))))))))
\\
41'
,
''
,
SYNTAX_ERROR
),
(
'(((((((((a)))))))))'
,
'a'
,
SUCCEED
,
'found'
,
'a'
),
(
'multiple words of text'
,
'uh-uh'
,
FAIL
),
(
'multiple words'
,
'multiple words, yeah'
,
SUCCEED
,
'found'
,
'multiple words'
),
...
...
@@ -400,7 +401,7 @@ tests = [
(
'(?i)(a)b(c)'
,
'ABC'
,
SUCCEED
,
'found+"-"+g1+"-"+g2'
,
'ABC-A-C'
),
(
'(?i)a+b+c'
,
'AABBABC'
,
SUCCEED
,
'found'
,
'ABC'
),
(
'(?i)a{1,}b{1,}c'
,
'AABBABC'
,
SUCCEED
,
'found'
,
'ABC'
),
#
('(?i)a**', '-', SYNTAX_ERROR),
(
'(?i)a**'
,
'-'
,
SYNTAX_ERROR
),
(
'(?i)a.+?c'
,
'ABCABC'
,
SUCCEED
,
'found'
,
'ABC'
),
(
'(?i)a.*?c'
,
'ABCABC'
,
SUCCEED
,
'found'
,
'ABC'
),
(
'(?i)a.{0,5}?c'
,
'ABCABC'
,
SUCCEED
,
'found'
,
'ABC'
),
...
...
@@ -447,6 +448,7 @@ tests = [
(
'(?i)((((((((((a))))))))))
\\
10'
,
'AA'
,
SUCCEED
,
'found'
,
'AA'
),
#('(?i)((((((((((a))))))))))\\41', 'AA', FAIL),
#('(?i)((((((((((a))))))))))\\41', 'A!', SUCCEED, 'found', 'A!'),
(
'(?i)((((((((((a))))))))))
\\
41'
,
''
,
SYNTAX_ERROR
),
(
'(?i)(((((((((a)))))))))'
,
'A'
,
SUCCEED
,
'found'
,
'A'
),
(
'(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))'
,
'A'
,
SUCCEED
,
'g1'
,
'A'
),
(
'(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))'
,
'C'
,
SUCCEED
,
'g1'
,
'C'
),
...
...
@@ -474,11 +476,15 @@ tests = [
(
'w(?# comment'
,
'w'
,
SYNTAX_ERROR
),
(
'w(?# comment 1)xy(?# comment 2)z'
,
'wxyz'
,
SUCCEED
,
'found'
,
'wxyz'
),
# Check odd placement of embedded pattern modifiers
(
'w(?i)'
,
'W'
,
SYNTAX_ERROR
),
# Comments using the x embedded pattern modifier
(in an unusual place too)
# Comments using the x embedded pattern modifier
(
"""w# comment 1
x
(?x)
y
(
"""
(?x)
w# comment 1
x y
# comment 2
z"""
,
'wxyz'
,
SUCCEED
,
'found'
,
'wxyz'
),
...
...
@@ -491,8 +497,19 @@ xyz""", FAIL),
abc
xyz"""
,
SUCCEED
,
'found'
,
'abc'
),
(
'(?m)abc$'
,
"""jkl
xyzabc
123"""
,
SUCCEED
,
'found'
,
'abc'
),
# using the s embedded pattern modifier
(
'a.b'
,
'a
\n
b'
,
FAIL
),
(
'(?s)a.b'
,
'a
\n
b'
,
SUCCEED
,
'found'
,
'a
\n
b'
),
# test \w, etc.
(
'
\\
w+'
,
'--ab_cd0123--'
,
SUCCEED
,
'found'
,
'ab_cd0123'
),
(
'
\\
D+'
,
'1234abc5678'
,
SUCCEED
,
'found'
,
'abc'
),
(
'[
\\
da-fA-F]+'
,
'123abc'
,
SUCCEED
,
'found'
,
'123abc'
),
(
'[
\\
d-x]'
,
'-'
,
SYNTAX_ERROR
),
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment