2 # Tests for bugs relating to replacing/renaming files in the srcdir.
5 use Test::More 'no_plan';
8 my $srcdir="t/tmp/src";
9 my $destdir="t/tmp/dest";
10 ok(! system("make -s ikiwiki.out"));
12 # runs ikiwiki to build test site
14 ok(! system("perl -I. ./ikiwiki.out -plugin html -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates $srcdir $destdir @_"));
20 ok(! system("rm -rf $srcdir/.ikiwiki $destdir"));
24 ok(! system("rm -rf $srcdir $destdir"));
25 ok(! system("mkdir -p $srcdir"));
28 # At one point, changing the extension of the source file of a page caused
31 ok(! system("touch $srcdir/foo.mdwn"));
33 ok(! system("mv $srcdir/foo.mdwn $srcdir/foo.html"));
35 ok(! system("mv $srcdir/foo.html $srcdir/foo.mdwn"));
38 # Changing a non-page file into a page could also cause ikiwiki to fail.
40 ok(! system("touch $srcdir/foo"));
42 ok(! system("mv $srcdir/foo $srcdir/foo.mdwn"));
45 # Changing a page file into a non-page could also cause ikiwiki to fail.
47 ok(! system("touch $srcdir/foo.mdwn"));
49 ok(! system("mv $srcdir/foo.mdwn $srcdir/foo"));
53 ok(! system("rm -rf t/tmp"));