You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rw...@apache.org on 2006/12/20 10:59:59 UTC

svn commit: r489007 - /jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/test/java/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java

Author: rwinston
Date: Wed Dec 20 01:59:58 2006
New Revision: 489007

URL: http://svn.apache.org/viewvc?view=rev&rev=489007
Log:
Add test for group names with embedded spaces

Modified:
    jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/test/java/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java

Modified: jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/test/java/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/test/java/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java?view=diff&rev=489007&r1=489006&r2=489007
==============================================================================
--- jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/test/java/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java (original)
+++ jakarta/commons/proper/net/branches/JDK_1_5_BRANCH/src/test/java/org/apache/commons/net/ftp/parser/NTFTPEntryParserTest.java Wed Dec 20 01:59:58 2006
@@ -47,6 +47,7 @@
             "-rw-r--r--   1 root     root       190144 Apr 27  2001 zxJDBC-2.0.1b1.zip",
             "-rwxr-xr-x   2 500      500           166 Nov  2  2001 73131-testtes1.afp",
             "-rw-r--r--   1 500      500           166 Nov  9  2001 73131-testtes1.AFP",
+            "drwx------ 4 maxm Domain Users 512 Oct 2 10:59 .metadata",
         }
     };
 
@@ -181,11 +182,6 @@
         assertTrue("Should have been a file.",
                 f.isFile());
         assertEquals(17707, f.getSize());
-
-
-
-
-
     }
 
 
@@ -195,7 +191,7 @@
         {
                     assertEquals("directory.type",
                             FTPFile.DIRECTORY_TYPE, f.getType());
-                }
+        }
     }
 
     /**
@@ -219,5 +215,14 @@
         assertNotNull(f);
         assertEquals("name", "123 abc xyz", f.getName());
     }
-
+    
+    /**
+     * Test that group names with embedded spaces can be handled correctly
+     *
+     */
+    public void testGroupNameWithSpaces() {
+    	FTPFile f = getParser().parseFTPEntry("drwx------ 4 maxm Domain Users 512 Oct 2 10:59 .metadata");
+    	assertEquals(f.getGroup(), "Domain Users");	
+    }
+    
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org