mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Add test for glob slash and backslash consistency
This commit is contained in:
parent
f575588ccf
commit
14b698c436
1 changed files with 7 additions and 0 deletions
|
|
@ -160,6 +160,13 @@ def test_glob_nested_directory(self):
|
|||
self.norm('a', 'bcd', 'efg')])
|
||||
eq(self.glob('a', 'bcd', '*g'), [self.norm('a', 'bcd', 'efg')])
|
||||
|
||||
def test_glob_consistency(self):
|
||||
eq = self.assertSequencesEqual_noorder
|
||||
if sys.platform.startswith("win"):
|
||||
eq(self.glob(r'a\\\\bcd/efg', '*'), [(rf'{self.tempdir}\a\\\\bcd/efg\ha')])
|
||||
else:
|
||||
eq(self.glob('a////bcd/efg', '*'), [(f'{self.tempdir}/a////bcd/efg/ha')])
|
||||
|
||||
def test_glob_directory_names(self):
|
||||
eq = self.assertSequencesEqual_noorder
|
||||
eq(self.glob('*', 'D'), [self.norm('a', 'D')])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue