1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 10:35:41 -04:00
perlbuut/deps/JavaScript-SpiderMonkey-0.19-patched/t/005error.t
2009-12-05 00:02:04 -05:00

30 lines
640 B
Perl
Executable file

######################################################################
# Testcase: Produce an error and check $@
# Revision: $Revision: 1.1.1.1 $
# Last Checkin: $Date: 2006/02/01 06:00:49 $
# By: $Author: mschilli $
#
# Author: Mike Schilli m@perlmeister.com, 2004
######################################################################
use warnings;
use strict;
use JavaScript::SpiderMonkey;
print "1..1\n";
my $js = JavaScript::SpiderMonkey->new();
$js->init();
my $code = <<EOT;
foo = "bar;
EOT
$js->eval($code);
if($@ =~ /unterminated string literal/) {
print "ok 1\n";
} else {
print "not ok 1\n";
}