t/hoge.t use Test::Base qw/no_plan/; my $DIR = 't/data'; spec_string( &load_data() ); run { my $block = shift; # 貴方のテストをここへ。テスト名を入れるのを忘れずにね。 is( $block->before , $block->after , $block->name ); }; sub load_data { opendir(DIR, $DIR) or die $@; my @list = readdir(DIR); closedir(DIR); my $data = ''; for my $file ( @list ) { next unless $file =~ /\.dat$/; my $dat = $DIR .'/'. $file; my $name = "\e[33m