test/script/nosecurity/JDK-8055034.js

Print this page

        

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