]> sipb.mit.edu Git - ikiwiki.git/blobdiff - t/conflicts.t
avoid error if two source files render the same destination file
[ikiwiki.git] / t / conflicts.t
index ac5f93b03c6531780182dd8a622e779409c67eba..81b2c12cb963a8b292559cf8fb61108520077ca2 100755 (executable)
@@ -2,7 +2,7 @@
 # Tests for bugs relating to conflicting files in the srcdir
 use warnings;
 use strict;
-use Test::More tests => 48;
+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"));