4 use Test::More tests => 6;
5 use File::Path qw(make_path remove_tree);
7 BEGIN { use_ok("IkiWiki"); }
8 BEGIN { use_ok("IkiWiki::Render"); }
10 %config=IkiWiki::defaultconfig();
14 make_path("t/tmp/srcdir/a/b/c");
15 make_path("t/tmp/srcdir/d/e/f");
16 writefile("a/b/c/d.mdwn", "t/tmp/srcdir", "foo");
17 writefile("d/e/f/g.mdwn", "t/tmp/srcdir", "foo");
18 IkiWiki::prune("t/tmp/srcdir/d/e/f/g.mdwn");
19 ok(-d "t/tmp/srcdir");
20 ok(! -e "t/tmp/srcdir/d");
21 IkiWiki::prune("t/tmp/srcdir/a/b/c/d.mdwn", "t/tmp/srcdir");
22 ok(-d "t/tmp/srcdir");
23 ok(! -e "t/tmp/srcdir/a");