diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/autoindex.t | 3 | ||||
-rwxr-xr-x | t/tag.t | 16 |
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; @@ -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; |