# HG changeset patch # User mhaupt # Date 1431678108 -7200 # Node ID 4dc7eb763139ba8b8436a3650456921f1ab84929 # Parent 92958064570c38f1b55ff255be5c8ce3169ca662 8080471: fix usage of replace and file separator in Nashorn tests Summary: Two tests should use replace instead of replaceAll, and there is a typo in the usage of File.separator. Reviewed-by: attila, hannesw diff -r 92958064570c -r 4dc7eb763139 test/script/nosecurity/JDK-8050964.js --- a/test/script/nosecurity/JDK-8050964.js Fri May 15 10:19:37 2015 +0200 +++ b/test/script/nosecurity/JDK-8050964.js Fri May 15 10:21:48 2015 +0200 @@ -47,9 +47,9 @@ } var javahome = System.getProperty("java.home"); -var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater); +var jdepsPath = javahome + "/../bin/jdeps".replace(/\//g, File.separator); if (! new File(jdepsPath).isFile()) { - jdepsPath = javahome + "/bin/jdeps".replaceAll(/\//g, File.separater); + jdepsPath = javahome + "/bin/jdeps".replace(/\//g, File.separator); } // run jdep on nashorn.jar - only summary but print profile info diff -r 92958064570c -r 4dc7eb763139 test/script/nosecurity/JDK-8055034.js --- a/test/script/nosecurity/JDK-8055034.js Fri May 15 10:19:37 2015 +0200 +++ b/test/script/nosecurity/JDK-8055034.js Fri May 15 10:21:48 2015 +0200 @@ -46,10 +46,10 @@ // we want to use nashorn.jar passed and not the one that comes with JRE var jjsCmd = javahome + "/../bin/jjs"; -jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater); +jjsCmd = jjsCmd.toString().replace(/\//g, File.separator); if (! new File(jjsCmd).isFile()) { jjsCmd = javahome + "/bin/jjs"; - jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater); + jjsCmd = jjsCmd.toString().replace(/\//g, File.separator); } jjsCmd += " -J-Xbootclasspath/p:" + nashornJar;