Subject: | Test failures on some linux systems, depending on javascript interpreter? |
The matrix summary page
http://matrix.cpantesters.org/?dist=Language%3A%3AExpr shows that there
are many test failures on Linux systems. I suspect the success of the
test suite depends on the specific javascript interepreter installed.
On my system it fails like this:
# Failed test 'category=var ${a b}, js=q{let a=1; let b=2; let
ary1=['one','two','three']; let hash1={one:1, two:2, three:3};a b}, run
error: (?^i:Bareword found))'
# at t/eval-js.t line 129.
# expecting: Regexp ((?^i:Bareword found))
# found: syntax error/invalid syntax: cmd=/usr/bin/js -e 'let a=1; let
b=2; let ary1=['\''one'\'','\''two'\'','\''three'\'']; let hash1={one:1,
two:2, three:3};print(JSON.stringify(a b))' 2>&1, output=-e:1:
SyntaxError: missing ) after argument list:
# -e:1: let a=1; let b=2; let ary1=['one','two','three']; let
hash1={one:1, two:2, three:3};print(JSON.stringify(a b))
# -e:1:
...........................................................................................................^
This can be reproduced directly on the cmdline:
$ /usr/bin/js -e 'let a=1; let b=2; let
ary1=['\''one'\'','\''two'\'','\''three'\'']; let hash1={one:1, two:2,
three:3};print(JSON.stringify(a b))'
-e:1: SyntaxError: missing ) after argument list:
-e:1: let a=1; let b=2; let ary1=['one','two','three']; let
hash1={one:1, two:2, three:3};print(JSON.stringify(a b))
-e:1:
...........................................................................................................^
Without the JSON call there's no error:
$ /usr/bin/js -e 'let a=1; let b=2; let
ary1=['\''one'\'','\''two'\'','\''three'\'']; let hash1={one:1, two:2,
three:3};'
js interepreter installed (this is a Debian/squeeze system):
$ js --version
JavaScript-C 1.8.0 pre-release 1 2007-10-03
Regards,
Slaven