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
b98d6b2c
Kaydet (Commit)
b98d6b2c
authored
Agu 16, 2009
tarafından
Gregory P. Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue 6665: Fix fnmatch to properly match filenames with newlines in them.
üst
1ce2d530
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
fnmatch.py
Lib/fnmatch.py
+1
-1
test_fnmatch.py
Lib/test/test_fnmatch.py
+8
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/fnmatch.py
Dosyayı görüntüle @
b98d6b2c
...
...
@@ -104,4 +104,4 @@ def translate(pat):
res
=
'
%
s[
%
s]'
%
(
res
,
stuff
)
else
:
res
=
res
+
re
.
escape
(
c
)
return
res
+
"$"
return
res
+
'
\
Z(?ms)'
Lib/test/test_fnmatch.py
Dosyayı görüntüle @
b98d6b2c
...
...
@@ -32,11 +32,18 @@ class FnmatchTestCase(unittest.TestCase):
check
(
'a'
,
'b'
,
0
)
# these test that '\' is handled correctly in character sets;
# see SF bug #
???
# see SF bug #
409651
check
(
'
\\
'
,
r'[\]'
)
check
(
'a'
,
r'[!\]'
)
check
(
'
\\
'
,
r'[!\]'
,
0
)
# test that filenames with newlines in them are handled correctly.
# http://bugs.python.org/issue6665
check
(
'foo
\n
bar'
,
'foo*'
)
check
(
'foo
\n
bar
\n
'
,
'foo*'
)
check
(
'
\n
foo'
,
'foo*'
,
False
)
check
(
'
\n
'
,
'*'
)
def
test_main
():
test_support
.
run_unittest
(
FnmatchTestCase
)
...
...
Misc/NEWS
Dosyayı görüntüle @
b98d6b2c
...
...
@@ -359,6 +359,8 @@ Core and Builtins
Library
-------
- Issue #6665: Fix fnmatch to properly match filenames with newlines in them.
- Issue #1135: Add the XView and YView mix-ins to avoid duplicating
the xview* and yview* methods.
...
...
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