summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/autoindex.t3
-rwxr-xr-xt/tag.t16
2 files changed, 11 insertions, 8 deletions
diff --git a/t/autoindex.t b/t/autoindex.t
index b47f2e0eb..9bef2415a 100755
--- a/t/autoindex.t
+++ b/t/autoindex.t
@@ -3,7 +3,7 @@ package IkiWiki;
use warnings;
use strict;
-use Test::More;
+use Test::More tests => 17;
BEGIN { use_ok("IkiWiki"); }
BEGIN { use_ok("IkiWiki::Render"); }
@@ -70,5 +70,4 @@ ok(! -f "t/tmp/reinstated.mdwn");
ok(! exists $wikistate{autoindex}{deleted}{tags});
ok(-s "t/tmp/tags.mdwn");
-done_testing();
1;
diff --git a/t/tag.t b/t/tag.t
index 693900c43..2d0a6e662 100755
--- a/t/tag.t
+++ b/t/tag.t
@@ -63,21 +63,25 @@ is_deeply([sort keys %autofiles], [qw(tags/lucky.mdwn tags/numbers.mdwn tags/pri
ok(!-e "t/tmp/tags/lucky.mdwn");
my (%pages, @del);
IkiWiki::gen_autofile("tags/lucky.mdwn", \%pages, \@del);
-is_deeply(\%pages, {"t/tmp/tags/lucky" => 1}) || diag explain \%pages;
-is_deeply(\@del, []) || diag explain \@del;
+is_deeply(\%pages, {"t/tmp/tags/lucky" => 1});
+is_deeply(\@del, []);
ok(-s "t/tmp/tags/lucky.mdwn");
# generating an autofile that already exists does nothing
%pages = @del = ();
IkiWiki::gen_autofile("tags/numbers.mdwn", \%pages, \@del);
-is_deeply(\%pages, {}) || diag explain \%pages;
-is_deeply(\@del, []) || diag explain \@del;
+is_deeply(\%pages, {});
+is_deeply(\@del, []);
# generating an autofile that we just deleted does nothing
%pages = ();
@del = ('tags/primes.mdwn');
IkiWiki::gen_autofile("tags/primes.mdwn", \%pages, \@del);
-is_deeply(\%pages, {}) || diag explain \%pages;
-is_deeply(\@del, ['tags/primes.mdwn']) || diag explain \@del;
+is_deeply(\%pages, {});
+is_deeply(\@del, ['tags/primes.mdwn']);
+
+
+# cleanup
+ok(! system("rm -rf t/tmp"));
1;