47 |
47 |
48 // we want to use nashorn.jar passed and not the one that comes with JRE |
48 // we want to use nashorn.jar passed and not the one that comes with JRE |
49 var jjsCmd = javahome + "/../bin/jjs"; |
49 var jjsCmd = javahome + "/../bin/jjs"; |
50 jjsCmd += " -J-Djava.ext.dirs=" + nashornJarDir; |
50 jjsCmd += " -J-Djava.ext.dirs=" + nashornJarDir; |
51 jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater); |
51 jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater); |
52 |
52 $ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin |
53 $EXEC(jjsCmd, "var x = Object.create(null);\nx;\nprint('PASSED');\nexit(0)"); |
53 $EXEC(jjsCmd, "var x = Object.create(null);\nx;\nprint('PASSED');\nexit(0)"); |
54 |
54 |
55 // $ERR has all interactions including prompts! Just check for error substring. |
55 // $ERR has all interactions including prompts! Just check for error substring. |
56 var err = $ERR.trim(); |
56 var err = $ERR.trim(); |
57 if (! err.contains("TypeError: Cannot get default string value")) { |
57 if (! err.contains("TypeError: Cannot get default string value")) { |