X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/06137b95d419fd62a3c8065430fec302c2680454..a7e119767ce0b042075fd8955599e30df13e290b:/t/mercurial.t diff --git a/t/mercurial.t b/t/mercurial.t index c42e328c2..954b17526 100755 --- a/t/mercurial.t +++ b/t/mercurial.t @@ -12,13 +12,14 @@ BEGIN { } } } -use Test::More tests => 10; +use Test::More tests => 11; BEGIN { use_ok("IkiWiki"); } %config=IkiWiki::defaultconfig(); $config{rcs} = "mercurial"; $config{srcdir} = "$dir/repo"; +IkiWiki::loadplugins(); IkiWiki::checkconfig(); system "hg init $config{srcdir}"; @@ -34,7 +35,7 @@ my @changes; is($#changes, 0); is($changes[0]{message}[0]{"line"}, "Added the first page"); -is($changes[0]{pages}[0]{"page"}, "test1.mdwn"); +is($changes[0]{pages}[0]{"page"}, "test1"); is($changes[0]{user}, "Joe User"); # Manual commit @@ -45,15 +46,18 @@ my $message = "Added the second page"; my $test2 = readfile("t/test2.mdwn"); writefile('test2.mdwn', $config{srcdir}, $test2); system "hg add -R $config{srcdir} $config{srcdir}/test2.mdwn"; -system "hg commit -R $config{srcdir} -u \"$user\" -m \"$message\""; +system "hg commit -R $config{srcdir} -u \"$user\" -m \"$message\" -d \"0 0\""; @changes = IkiWiki::rcs_recentchanges(3); is($#changes, 1); is($changes[0]{message}[0]{"line"}, $message); is($changes[0]{user}, $username); -is($changes[0]{pages}[0]{"page"}, "test2.mdwn"); +is($changes[0]{pages}[0]{"page"}, "test2"); -is($changes[1]{pages}[0]{"page"}, "test1.mdwn"); +is($changes[1]{pages}[0]{"page"}, "test1"); + +my $ctime = IkiWiki::rcs_getctime("test2.mdwn"); +is($ctime, 0); system "rm -rf $dir";