diff options
author | Jason Tishler <jason@tishler.net> | 2002-09-30 15:44:41 (GMT) |
---|---|---|
committer | Jason Tishler <jason@tishler.net> | 2002-09-30 15:44:41 (GMT) |
commit | 884554dfe54fe4015a1ca2c0624e247dce9312f5 (patch) | |
tree | b39f0440e89cfaee11ae9a51d87278debab210a9 /Lib/test/test_commands.py | |
parent | b45b9feafbff2a4188caf7c8d4042f88e948bee5 (diff) | |
download | cpython-884554dfe54fe4015a1ca2c0624e247dce9312f5.zip cpython-884554dfe54fe4015a1ca2c0624e247dce9312f5.tar.gz cpython-884554dfe54fe4015a1ca2c0624e247dce9312f5.tar.bz2 |
Patch #544740: test_commands test fails under Cygwin
Relax regular expression to handle spaces in user and group names.
Diffstat (limited to 'Lib/test/test_commands.py')
-rw-r--r-- | Lib/test/test_commands.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_commands.py b/Lib/test/test_commands.py index 56d4e7c..dfa1977 100644 --- a/Lib/test/test_commands.py +++ b/Lib/test/test_commands.py @@ -38,13 +38,15 @@ class CommandTests(unittest.TestCase): def test_getstatus(self): # This pattern should match 'ls -ld /.' on any posix - # system, however perversely configured. + # system, however perversely configured. Even on systems + # (e.g., Cygwin) where user and group names can have spaces: + # drwxr-xr-x 15 Administ Domain U 4096 Aug 12 12:50 / + # drwxr-xr-x 15 Joe User My Group 4096 Aug 12 12:50 / + # Note that the first case above has a space in the group name + # while the second one has a space in both names. pat = r'''d......... # It is a directory. \s+\d+ # It has some number of links. - \s+\w+\s+\w+ # It has a user and group, which may - # be named anything. - \s+\d+ # It has a size. - [^/]* # Skip the date. + [^/]* # Skip user, group, size, and date. /\. # and end with the name of the file. ''' |