X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/58e854555a5af63c811185e1196fee950ea2f58d..f695bdd843520729aa73cd063c22f1ebd1a01f1f:/t/tag.t diff --git a/t/tag.t b/t/tag.t index ec17d5434..0d360b06e 100755 --- a/t/tag.t +++ b/t/tag.t @@ -3,7 +3,7 @@ package IkiWiki; use warnings; use strict; -use Test::More tests => 21; +use Test::More tests => 23; BEGIN { use_ok("IkiWiki"); } BEGIN { use_ok("IkiWiki::Render"); } @@ -22,6 +22,7 @@ $config{wiki_file_chars} = "-[:alnum:]+/.:_"; $config{userdir} = "users"; $config{tagbase} = "tags"; $config{tag_autocreate} = 1; +$config{tag_autocreate_commit} = 0; $config{default_pageext} = "mdwn"; $config{wiki_file_prune_regexps} = [qr/^\./]; $config{underlaydirbase} = '.'; @@ -58,13 +59,15 @@ IkiWiki::Plugin::tag::preprocess_tag(page => "seven", numbers => undef, primes = is($autofiles{"tags/lucky.mdwn"}{plugin}, "tag"); is($autofiles{"tags/numbers.mdwn"}{plugin}, "tag"); is($autofiles{"tags/primes.mdwn"}{plugin}, "tag"); +is_deeply([sort keys %autofiles], [qw(tags/lucky.mdwn tags/numbers.mdwn tags/primes.mdwn)]); 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; -ok(-s "t/tmp/tags/lucky.mdwn"); +ok(! -s "t/tmp/tags/lucky.mdwn"); +ok(-s "t/tmp/.ikiwiki/transient/tags/lucky.mdwn"); # generating an autofile that already exists does nothing %pages = @del = ();