]> sipb.mit.edu Git - ikiwiki.git/commitdiff
another class of conflicts: subdir/file conflicts
authorJoey Hess <joey@kitenet.net>
Sun, 18 Jul 2010 21:16:39 +0000 (17:16 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 18 Jul 2010 21:16:39 +0000 (17:16 -0400)
t/conflicts.t

index 4664e1b6ed4e0404cdd40449de60c5380788fac5..d7e04d3ae39a66b1bdcd711aa0aa0ee12f0584ec 100755 (executable)
@@ -2,7 +2,7 @@
 # Tests for bugs relating to conflicting files in the srcdir
 use warnings;
 use strict;
 # Tests for bugs relating to conflicting files in the srcdir
 use warnings;
 use strict;
-use Test::More tests => 92;
+use Test::More tests => 106;
 
 # setup
 my $srcdir="t/tmp/src";
 
 # setup
 my $srcdir="t/tmp/src";
@@ -64,6 +64,19 @@ setupiki("initial setup");
 ok(! system("touch $srcdir/foo.mdwn"));
 refreshiki("conflicting non-page added (page already existing) in refresh");
 
 ok(! system("touch $srcdir/foo.mdwn"));
 refreshiki("conflicting non-page added (page already existing) in refresh");
 
+# Page that renders to a file that is also a subdirectory holding another
+# file.
+newsrcdir();
+ok(! system("touch $srcdir/foo.mdwn"));
+ok(! system("mkdir -p $srcdir/foo/index.html"));
+ok(! system("touch $srcdir/foo/index.html/bar.mdwn"));
+setupiki("conflicting page file and subdirectory");
+newsrcdir();
+ok(! system("touch $srcdir/foo.mdwn"));
+ok(! system("mkdir -p $srcdir/foo/index.html"));
+ok(! system("touch $srcdir/foo/index.html/bar"));
+setupiki("conflicting page file and subdirectory 2");
+
 # Changing a page file into a non-page could also cause ikiwiki to fail.
 newsrcdir();
 ok(! system("touch $srcdir/foo.mdwn"));
 # Changing a page file into a non-page could also cause ikiwiki to fail.
 newsrcdir();
 ok(! system("touch $srcdir/foo.mdwn"));