use v5.12;
use warnings;
-use Test::Simple tests => 4;
+use Test::Simple tests => 6;
use Test::Differences;
use Test::Exception;
$fh = str_file_handle(<<EOF);
lead off with junk
EOF
+throws_ok { read_tags($fh) } qr/no field name in: lead off with junk/;
$fh = str_file_handle(<<EOF);
ARTIST=Reba McEntire
-starteed off good but went bad...
+started off good but went bad...
EOF
+throws_ok { read_tags($fh) } qr/no field name in: started off good/;
exit;
warn("looks like DESCRIPTION had multiple lines; discarding and returning early: $_");
last
}
- die("no field name in $_");
+ die("no field name in: $_");
}
$name = $1;
# TODO validate $name