+# needs creating (deferred; part of the autofile mechanism now)
+ok(! exists $wikistate{autoindex}{autofile}{"tags.mdwn"});
+%pages = ();
+@del = ();
+is($autofiles{"tags.mdwn"}{plugin}, "autoindex");
+IkiWiki::gen_autofile("tags.mdwn", \%pages, \@del);
+is_deeply(\%pages, {"t/tmp/tags" => 1});
+is_deeply(\@del, []);
+ok(! -s "t/tmp/tags.mdwn");
+ok(-s "t/tmp/.ikiwiki/transient/tags.mdwn");
+
+# needs creating because of an attachment
+ok(! exists $wikistate{autoindex}{autofile}{"attached.mdwn"});
+%pages = ();
+@del = ();
+is($autofiles{"attached.mdwn"}{plugin}, "autoindex");
+IkiWiki::gen_autofile("attached.mdwn", \%pages, \@del);
+is_deeply(\%pages, {"t/tmp/attached" => 1});
+is_deeply(\@del, []);
+ok(-s "t/tmp/.ikiwiki/transient/attached.mdwn");