X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/41423084295f4b694cdb0ec208ea0a1807dc8a62..773db5a35e5b81fee3f1f8bf48dffc1dd4f3e2fe:/t/conflicts.t diff --git a/t/conflicts.t b/t/conflicts.t index 7748c105f..81b2c12cb 100755 --- a/t/conflicts.t +++ b/t/conflicts.t @@ -2,7 +2,7 @@ # Tests for bugs relating to conflicting files in the srcdir use warnings; use strict; -use Test::More 'no_plan'; +use Test::More tests => 76; # setup my $srcdir="t/tmp/src"; @@ -48,6 +48,22 @@ ok(! system("touch $srcdir/foo.mdwn")); ok(! system("touch $srcdir/foo.txt")); setupiki("conflicting page sources in setup"); +# Page and non-page file with same pagename. +newsrcdir(); +ok(! system("touch $srcdir/foo.mdwn")); +ok(! system("touch $srcdir/foo")); +setupiki("conflicting page and non-page in setup"); +newsrcdir(); +ok(! system("touch $srcdir/foo.mdwn")); +setupiki("initial setup"); +ok(! system("touch $srcdir/foo")); +refreshiki("conflicting page added (non-page already existing) in refresh"); +newsrcdir(); +ok(! system("touch $srcdir/foo")); +setupiki("initial setup"); +ok(! system("touch $srcdir/foo.mdwn")); +refreshiki("conflicting non-page added (page already existing) in refresh"); + # Changing a page file into a non-page could also cause ikiwiki to fail. newsrcdir(); ok(! system("touch $srcdir/foo.mdwn")); @@ -70,6 +86,13 @@ setupiki("initial setup"); ok(! system("mkdir -p $srcdir/foo")); ok(! system("touch $srcdir/foo/index.html")); refreshiki("rawhtml file rendered same as existing page in refresh"); +# Inverse added when refreshing +newsrcdir(); +ok(! system("mkdir -p $srcdir/foo")); +ok(! system("touch $srcdir/foo/index.html")); +setupiki("initial setup"); +ok(! system("touch $srcdir/foo.mdwn")); +refreshiki("page rendered same as existing rawhtml file in refresh"); # Present during setup newsrcdir(); ok(! system("touch $srcdir/foo.mdwn"));