Skip Menu |

This queue is for tickets about the Language-Expr CPAN distribution.

Report information
The Basics
Id: 78348
Status: resolved
Priority: 0/
Queue: Language-Expr

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.18
Fixed in: (no value)



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
On 2012-07-13 07:15:42, SREZIC wrote: Show quoted text
> js interepreter installed (this is a Debian/squeeze system): > > $ js --version > JavaScript-C 1.8.0 pre-release 1 2007-10-03
It seems that this is Spidermonkey. If I try out another available javascript interpreter (rhino), then even less is working: $ /usr/bin/js -e 'let a=1; let b=2; let ary1=['\''one'\'','\''two'\'','\''three'\'']; let hash1={one:1, two:2, three:3};' js: uncaught JavaScript runtime exception: ReferenceError: "let" is not defined. js: Couldn't read source file "a=1;: a=1; (No such file or directory)". Regards, Slaven
On Fri Jul 13 08:14:15 2012, SREZIC wrote: Show quoted text
> On 2012-07-13 07:15:42, SREZIC wrote: >
> > js interepreter installed (this is a Debian/squeeze system): > > > > $ js --version > > JavaScript-C 1.8.0 pre-release 1 2007-10-03
> > It seems that this is Spidermonkey. If I try out another available > javascript interpreter (rhino), then even less is working: > > $ /usr/bin/js -e 'let a=1; let b=2; let > ary1=['\''one'\'','\''two'\'','\''three'\'']; let hash1={one:1, two:2, > three:3};' > js: uncaught JavaScript runtime exception: ReferenceError: "let" is
not Show quoted text
> defined. > > js: Couldn't read source file "a=1;: a=1; (No such file or
directory)". Show quoted text
> > Regards, > Slaven > >
Yup, rhino is too behind (JS < 1.8) for the generated JS code, and I think has been avoided. Regards, Steven
On Fri Jul 13 07:15:42 2012, SREZIC wrote: Show quoted text
> 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: >
........................................................................ ...................................^ Show quoted text
> > 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: >
........................................................................ ...................................^ Show quoted text
> > 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
The test already expect a failure, it's just that the error message is different. I've fixed this in the repo, though couldn't confirm it since I couldn't reproduce this. Anyway, I'm disabling the JS and PHP tests anyway because of failing tests on my PC due to other problem (Regexp::Grammar problem/bug). Releasing 0.19, thanks. Regards, Steven