@@ -0,0 +1,2030 @@
+%0Apackage com.ecyrd.jspwiki;%0A%0Aimport junit.framework.*;%0Aimport java.io.*;%0Aimport java.util.*;%0A%0Apublic class RCSFileProviderTest extends TestCase%0A%7B%0A    public static final String NAME1 = %22Test1%22;%0A%0A    Properties props = new Properties();%0A%0A    WikiEngine engine;%0A%0A    public RCSFileProviderTest( String s )%0A    %7B%0A        super( s );%0A    %7D%0A%0A    public void setUp()%0A        throws Exception%0A    %7B%0A        props.load( getClass().getClassLoader().getResourceAsStream(%22/jspwiki_rcs.properties%22) );%0A%0A        engine = new TestEngine2(props);%0A    %7D%0A%0A    public void tearDown()%0A    %7B%0A        String files = props.getProperty( FileSystemProvider.PROP_PAGEDIR );%0A%0A        File f = new File( files, NAME1+FileSystemProvider.FILE_EXT );%0A%0A        f.delete();%0A%0A        f = new File( files+File.separator+%22RCS%22, NAME1+FileSystemProvider.FILE_EXT+%22,v%22 );%0A%0A        f.delete();%0A%0A        f = new File( files, %22RCS%22 );%0A%0A        f.delete();%0A    %7D%0A%0A    /**%0A     *  Bug report by Anon: RCS under Windows 2k:%0A     * %3CPRE%3E%0A     * In getPageInfo of RCSFileProvider:%0A     *%0A     * Problem:%0A     *%0A     * With a longer rlog result, the break clause in the last %22else if%22 %0A     * breaks out of the reading loop before all the lines in the full %0A     * rlog have been read in. This causes the process.wait() to hang.%0A     *%0A     * Suggested quick fix:%0A     *%0A     * Always read all the contents of the rlog, even if it is slower.%0A     * %3C/PRE%3E%0A     *%0A     */%0A%0A    public void testMillionChanges()%0A    %7B%0A        String text = %22%22;%0A        String name = NAME1;%0A        int    maxver = 1000; // Save 1000 versions.%0A%0A        for( int i = 0; i %3C maxver; i++ )%0A        %7B%0A            text = text + %22.%22;%0A            engine.saveText( name, text );%0A        %7D%0A%0A        WikiPage pageinfo = engine.getPage( NAME1 );%0A%0A        assertEquals( %22wrong version%22, maxver, pageinfo.getVersion() );%0A        assertEquals( %22wrong text%22, maxver, engine.getText(NAME1).length() );%0A    %7D%0A%0A    public static Test suite()%0A    %7B%0A        return new TestSuite( RCSFileProviderTest.class );%0A    %7D%0A%7D%0A

Aded testMillionChanges().