Mercurial > hg > openjdk > aarch64-port > nashorn
changeset 1381:7320ba416df1
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
author | mhaupt |
---|---|
date | Fri, 15 May 2015 10:21:48 +0200 |
parents | 55c1eef5c4fc |
children | 0bfad612771a |
files | test/script/nosecurity/JDK-8050964.js test/script/nosecurity/JDK-8055034.js |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/test/script/nosecurity/JDK-8050964.js Wed May 06 15:46:54 2015 +0200 +++ b/test/script/nosecurity/JDK-8050964.js Fri May 15 10:21:48 2015 +0200 @@ -47,7 +47,7 @@ } var javahome = System.getProperty("java.home"); -var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater); +var jdepsPath = javahome + "/../bin/jdeps".replace(/\//g, File.separator); // run jdep on nashorn.jar - only summary but print profile info $ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin
--- a/test/script/nosecurity/JDK-8055034.js Wed May 06 15:46:54 2015 +0200 +++ b/test/script/nosecurity/JDK-8055034.js Fri May 15 10:21:48 2015 +0200 @@ -48,7 +48,7 @@ // 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); +jjsCmd = jjsCmd.toString().replace(/\//g, File.separator); $ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin $EXEC(jjsCmd, "var x = Object.create(null);\nx;\nprint('PASSED');\nexit(0)");