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/08func2.t
2009-12-05 00:02:04 -05:00

29 lines
487 B
Perl

######################################################################
# functions2
######################################################################
print "1..1\n";
$init = "";
require "t/init.pl";
$args = "";
$js->function_set("farz", sub { $args = join '', @_ });
my $source = <<EOT;
$init
farz("abc", "def", 3, 5, 8);
EOT
my $rc = $js->eval($source);
die "eval returned undef" unless $rc;
if($args ne "abcdef358") {
print "not ";
}
print "ok 1\n";
$js->destroy();