use strict;
use warnings;
use Test::More;
use YAML::XS;

my $yaml = <<'EOM';
@invalid
EOM

eval {
    my $xs = YAML::XS->new;
    my $data = $xs->load($yaml);
};
my $err = $@;
like $err, qr{found character that cannot start any token}, "error for invalid YAML";

done_testing;
