in t/modules/autoindex2.t [46:70]
sub setup {
t_mkdir $base_dir;
### normal dir
t_mkdir catdir $base_dir, "dir_normal";
### passwd protected dir
my $prot_dir = catdir $base_dir, "dir_protected";
# htpasswd file
t_write_file catfile($prot_dir, "htpasswd"), "nobody:HIoD8SxAgkCdQ";
# .htaccess file
my $content = <<CONTENT;
AuthType Basic
AuthName "Restricted Directory"
AuthUserFile $prot_dir/htpasswd
Require valid user
CONTENT
t_write_file catfile($prot_dir, ".htaccess"), $content;
### dir with a broken .htaccess
my $broken_dir = catdir $base_dir, "dir_broken";
t_write_file catfile($broken_dir, ".htaccess"),
"This_is_a_broken_on_purpose_.htaccess_file";
}