commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r391681 - /jakarta/commons/proper/fileupload/trunk/src/test/org/apache/commons/fileupload/ServletFileUploadTest.java
Date Wed, 05 Apr 2006 17:20:28 GMT
Author: bayard
Date: Wed Apr  5 10:20:26 2006
New Revision: 391681

URL: http://svn.apache.org/viewcvs?rev=391681&view=rev
Log:
Adding unit test for #38940 - filename being treated insensitive of case

Modified:
    jakarta/commons/proper/fileupload/trunk/src/test/org/apache/commons/fileupload/ServletFileUploadTest.java

Modified: jakarta/commons/proper/fileupload/trunk/src/test/org/apache/commons/fileupload/ServletFileUploadTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/fileupload/trunk/src/test/org/apache/commons/fileupload/ServletFileUploadTest.java?rev=391681&r1=391680&r2=391681&view=diff
==============================================================================
--- jakarta/commons/proper/fileupload/trunk/src/test/org/apache/commons/fileupload/ServletFileUploadTest.java
(original)
+++ jakarta/commons/proper/fileupload/trunk/src/test/org/apache/commons/fileupload/ServletFileUploadTest.java
Wed Apr  5 10:20:26 2006
@@ -122,6 +122,23 @@
         assertEquals("value2", multi1.getString());
     }
 
+    public void testFilenameCaseSensitivity() 
+            throws IOException, FileUploadException
+    {
+        List fileItems = parseUpload("-----1234\r\n" +
+                        "Content-Disposition: form-data; name=\"FiLe\"; filename=\"FOO.tab\"\r\n"
+
+                        "Content-Type: text/whatever\r\n" +
+                        "\r\n" +
+                        "This is the content of the file\n" +
+                        "\r\n" +
+                        "-----1234--\r\n");
+        assertEquals(1, fileItems.size());
+
+        FileItem file = (FileItem) fileItems.get(0);
+        assertEquals("FiLe", file.getFieldName());
+        assertEquals("FOO.tab", file.getName());
+    }
+
     /**
      * This is what the browser does if you submit the form without choosing a file.
      */



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


Mime
View raw message