+ok(! -f "t/tmp/in/has_internal.mdwn");
+
+# a directory containing only a page in an underlay is now indexed
+# (see [[transient autocreated tagbase is not transient autoindexed]])
+ok(! exists $wikistate{autoindex}{autofile}{"has_underlay.mdwn"});
+is($autofiles{"has_underlay.mdwn"}{plugin}, "autoindex");
+%pages = ();
+@del = ();
+IkiWiki::gen_autofile("has_underlay.mdwn", \%pages, \@del);
+is_deeply(\%pages, {"t/tmp/in/has_underlay" => 1});
+is_deeply(\@del, []);
+ok(! -f "t/tmp/in/has_underlay.mdwn");
+ok(-s "t/tmp/in/.ikiwiki/transient/has_underlay.mdwn");
+
+# a directory containing only a transient page is now indexed
+# (see [[transient autocreated tagbase is not transient autoindexed]])
+ok(! exists $wikistate{autoindex}{autofile}{"has_transient.mdwn"});
+is($autofiles{"has_transient.mdwn"}{plugin}, "autoindex");
+%pages = ();
+@del = ();
+IkiWiki::gen_autofile("has_transient.mdwn", \%pages, \@del);
+is_deeply(\%pages, {"t/tmp/in/has_transient" => 1});
+is_deeply(\@del, []);
+ok(! -f "t/tmp/in/has_transient.mdwn");
+ok(-s "t/tmp/in/.ikiwiki/transient/has_transient.mdwn");