[Python-checkins] python/dist/src/Lib/test test_commands.py,1.7,1.8

jlt63@users.sourceforge.net jlt63@users.sourceforge.net
Mon, 30 Sep 2002 08:44:43 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv21640

Modified Files:
	test_commands.py 
Log Message:
Patch #544740: test_commands test fails under Cygwin

Relax regular expression to handle spaces in user and group names.


Index: test_commands.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_commands.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test_commands.py	9 Aug 2002 16:37:35 -0000	1.7
--- test_commands.py	30 Sep 2002 15:44:41 -0000	1.8
***************
*** 39,49 ****
      def test_getstatus(self):
          # This pattern should match 'ls -ld /.' on any posix
!         # system, however perversely configured.
          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.
                    /\.          # and end with the name of the file.
                 '''
--- 39,51 ----
      def test_getstatus(self):
          # This pattern should match 'ls -ld /.' on any posix
!         # 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.
!                   [^/]*        # Skip user, group, size, and date.
                    /\.          # and end with the name of the file.
                 '''