mirror of
https://github.com/python/cpython.git
synced 2025-10-03 21:55:41 +00:00
#16664: Add regression tests for glob's behaviour concerning "."-entries
Patch by Sebastian Kreft.
This commit is contained in:
commit
0bb8d8c4c9
3 changed files with 11 additions and 2 deletions
|
@ -5,6 +5,7 @@ import glob
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
class GlobTests(unittest.TestCase):
|
class GlobTests(unittest.TestCase):
|
||||||
|
|
||||||
def norm(self, *parts):
|
def norm(self, *parts):
|
||||||
|
@ -21,6 +22,8 @@ class GlobTests(unittest.TestCase):
|
||||||
self.tempdir = TESTFN + "_dir"
|
self.tempdir = TESTFN + "_dir"
|
||||||
self.mktemp('a', 'D')
|
self.mktemp('a', 'D')
|
||||||
self.mktemp('aab', 'F')
|
self.mktemp('aab', 'F')
|
||||||
|
self.mktemp('.aa', 'G')
|
||||||
|
self.mktemp('.bb', 'H')
|
||||||
self.mktemp('aaa', 'zzzF')
|
self.mktemp('aaa', 'zzzF')
|
||||||
self.mktemp('ZZZ')
|
self.mktemp('ZZZ')
|
||||||
self.mktemp('a', 'bcd', 'EF')
|
self.mktemp('a', 'bcd', 'EF')
|
||||||
|
@ -66,6 +69,8 @@ class GlobTests(unittest.TestCase):
|
||||||
eq = self.assertSequencesEqual_noorder
|
eq = self.assertSequencesEqual_noorder
|
||||||
eq(self.glob('a*'), map(self.norm, ['a', 'aab', 'aaa']))
|
eq(self.glob('a*'), map(self.norm, ['a', 'aab', 'aaa']))
|
||||||
eq(self.glob('*a'), map(self.norm, ['a', 'aaa']))
|
eq(self.glob('*a'), map(self.norm, ['a', 'aaa']))
|
||||||
|
eq(self.glob('.*'), map(self.norm, ['.aa', '.bb']))
|
||||||
|
eq(self.glob('?aa'), map(self.norm, ['aaa']))
|
||||||
eq(self.glob('aa?'), map(self.norm, ['aaa', 'aab']))
|
eq(self.glob('aa?'), map(self.norm, ['aaa', 'aab']))
|
||||||
eq(self.glob('aa[ab]'), map(self.norm, ['aaa', 'aab']))
|
eq(self.glob('aa[ab]'), map(self.norm, ['aaa', 'aab']))
|
||||||
eq(self.glob('*q'), [])
|
eq(self.glob('*q'), [])
|
||||||
|
|
|
@ -650,6 +650,7 @@ Jerzy Kozera
|
||||||
Maksim Kozyarchuk
|
Maksim Kozyarchuk
|
||||||
Stefan Krah
|
Stefan Krah
|
||||||
Bob Kras
|
Bob Kras
|
||||||
|
Sebastian Kreft
|
||||||
Holger Krekel
|
Holger Krekel
|
||||||
Michael Kremer
|
Michael Kremer
|
||||||
Fabian Kreutz
|
Fabian Kreutz
|
||||||
|
|
|
@ -67,7 +67,7 @@ Core and Builtins
|
||||||
- Issue #14794: Fix slice.indices to return correct results for huge values,
|
- Issue #14794: Fix slice.indices to return correct results for huge values,
|
||||||
rather than raising OverflowError.
|
rather than raising OverflowError.
|
||||||
|
|
||||||
- Issue #15001: fix segfault on "del sys.module['__main__']". Patch by Victor
|
- Issue #15001: fix segfault on "del sys.modules['__main__']". Patch by Victor
|
||||||
Stinner.
|
Stinner.
|
||||||
|
|
||||||
- Issue #8271: the utf-8 decoder now outputs the correct number of U+FFFD
|
- Issue #8271: the utf-8 decoder now outputs the correct number of U+FFFD
|
||||||
|
@ -470,6 +470,9 @@ Extension Modules
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Issue #16664: Add regression tests for glob's behaviour concerning entries
|
||||||
|
starting with a ".". Patch by Sebastian Kreft.
|
||||||
|
|
||||||
- Issue #13390: The ``-R`` option to regrtest now also checks for memory
|
- Issue #13390: The ``-R`` option to regrtest now also checks for memory
|
||||||
allocation leaks, using :func:`sys.getallocatedblocks()`.
|
allocation leaks, using :func:`sys.getallocatedblocks()`.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue