jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r649940 - /incubator/jspwiki/trunk/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java
Date Sun, 20 Apr 2008 15:48:47 GMT
Author: jalkanen
Date: Sun Apr 20 08:48:45 2008
New Revision: 649940

URL: http://svn.apache.org/viewvc?rev=649940&view=rev
Log:
JSPWIKI-5: Added test for pages with dots.

Modified:
    incubator/jspwiki/trunk/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java

Modified: incubator/jspwiki/trunk/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java?rev=649940&r1=649939&r2=649940&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java
(original)
+++ incubator/jspwiki/trunk/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java
Sun Apr 20 08:48:45 2008
@@ -125,6 +125,22 @@
         assertEquals("Wrong contents", contents, "test");
     }
 
+    public void testDotsInBeginning()
+       throws Exception
+    {
+        WikiPage page = new WikiPage(m_engine, ".Test");
+
+        m_provider.putPageText( page, "test" );
+
+        File resultfile = new File( m_pagedir, "%2ETest.txt" );
+
+        assertTrue("No such file", resultfile.exists());
+
+        String contents = FileUtil.readContents( new FileInputStream(resultfile), "ISO-8859-1"
);
+
+        assertEquals("Wrong contents", contents, "test");
+    }
+    
     public void testAuthor()
         throws Exception
     {



Mime
View raw message