Permalink
Browse files

Item945: force to parse history file before checks

git-svn-id: http://svn.foswiki.org/trunk@2425 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
GilmarSantosJr GilmarSantosJr
GilmarSantosJr authored and GilmarSantosJr committed Feb 9, 2009
1 parent 321b1a8 commit 8abc507672d058055a8f258a967e04d8018a56a0
Showing with 22 additions and 4 deletions.
  1. +22 −4 UnitTestContrib/test/unit/RcsTests.pm
@@ -687,36 +687,49 @@ sub test_Item945 {
my $time = time();
$rcsWrap->addRevisionFromText( "old\nwrap text\n", "one", "iron", $time );
$rcsWrap->finish();
$rcsWrap = new Foswiki::Store::RcsWrap( $twiki, $testWeb, 'PinkPen' );
$this->assert_equals( 1, $rcsWrap->numRevisions() );
$this->assert_equals( 1, $rcsLite->numRevisions() );
$this->assert_deep_equals( [ 1, $time, "iron", "one" ],
[ $rcsWrap->getRevisionInfo(1) ] );
$this->assert_equals( 1, $rcsLite->numRevisions() );
$this->assert_deep_equals( [ 1, $time, "iron", "one" ],
[ $rcsLite->getRevisionInfo(1) ] );
$rcsWrap->addRevisionFromText( "new\nwrap text\n", "two", "tin",
$time + 1 );
$rcsWrap->finish();
$rcsWrap = new Foswiki::Store::RcsWrap( $twiki, $testWeb, 'PinkPen' );
$this->assert_equals( 2, $rcsWrap->numRevisions() );
$this->assert_equals( 2, $rcsLite->numRevisions() );
$this->assert_deep_equals( [ 1, $time, "iron", "one" ],
[ $rcsWrap->getRevisionInfo(1) ] );
$this->assert_deep_equals( [ 2, $time + 1, "tin", "two" ],
[ $rcsWrap->getRevisionInfo(2) ] );
$rcsLite->finish();
$rcsLite = new Foswiki::Store::RcsLite( $twiki, $testWeb, 'PinkPen' );
$this->assert_equals( 2, $rcsLite->numRevisions() );
$this->assert_deep_equals( [ 1, $time, "iron", "one" ],
[ $rcsLite->getRevisionInfo(1) ] );
$this->assert_deep_equals( [ 2, $time + 1, "tin", "two" ],
[ $rcsLite->getRevisionInfo(2) ] );
$rcsLite->addRevisionFromText( "old\nlite text\n",
"tre", "zinc", $time + 2 );
$rcsWrap->finish();
$rcsWrap = new Foswiki::Store::RcsWrap( $twiki, $testWeb, 'PinkPen' );
$this->assert_equals( 3, $rcsWrap->numRevisions() );
$this->assert_equals( 3, $rcsLite->numRevisions() );
$this->assert_deep_equals( [ 1, $time, "iron", "one" ],
[ $rcsWrap->getRevisionInfo(1) ] );
$this->assert_deep_equals( [ 2, $time + 1, "tin", "two" ],
[ $rcsWrap->getRevisionInfo(2) ] );
$this->assert_deep_equals( [ 3, $time + 2, "zinc", "tre" ],
[ $rcsWrap->getRevisionInfo(3) ] );
$rcsLite->finish();
$rcsLite = new Foswiki::Store::RcsLite( $twiki, $testWeb, 'PinkPen' );
$this->assert_equals( 3, $rcsLite->numRevisions() );
$this->assert_deep_equals( [ 1, $time, "iron", "one" ],
[ $rcsLite->getRevisionInfo(1) ] );
$this->assert_deep_equals( [ 2, $time + 1, "tin", "two" ],
@@ -726,8 +739,10 @@ sub test_Item945 {
$rcsLite->addRevisionFromText( "new\nlite text\n",
"for", "gold", $time + 3 );
$rcsWrap->finish();
$rcsWrap = new Foswiki::Store::RcsWrap( $twiki, $testWeb, 'PinkPen' );
$this->assert_equals( 4, $rcsWrap->numRevisions() );
$this->assert_equals( 4, $rcsLite->numRevisions() );
$this->assert_deep_equals( [ 1, $time, "iron", "one" ],
[ $rcsWrap->getRevisionInfo(1) ] );
$this->assert_deep_equals( [ 2, $time + 1, "tin", "two" ],
@@ -736,6 +751,9 @@ sub test_Item945 {
[ $rcsWrap->getRevisionInfo(3) ] );
$this->assert_deep_equals( [ 4, $time + 3, "gold", "for" ],
[ $rcsWrap->getRevisionInfo(4) ] );
$rcsLite->finish();
$rcsLite = new Foswiki::Store::RcsLite( $twiki, $testWeb, 'PinkPen' );
$this->assert_equals( 4, $rcsLite->numRevisions() );
$this->assert_deep_equals( [ 1, $time, "iron", "one" ],
[ $rcsLite->getRevisionInfo(1) ] );
$this->assert_deep_equals( [ 2, $time + 1, "tin", "two" ],

0 comments on commit 8abc507

Please sign in to comment.