You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ja...@apache.org on 2008/04/20 17:48:47 UTC
svn commit: r649940 -
/incubator/jspwiki/trunk/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java
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
{