8080471: fix usage of replace and file separator in Nashorn tests

Fri, 15 May 2015 10:21:48 +0200

author
mhaupt
date
Fri, 15 May 2015 10:21:48 +0200
changeset 1362
7320ba416df1
parent 1361
55c1eef5c4fc
child 1366
0bfad612771a

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

test/script/nosecurity/JDK-8050964.js file | annotate | diff | comparison | revisions
test/script/nosecurity/JDK-8055034.js file | annotate | diff | comparison | revisions
     1.1 --- a/test/script/nosecurity/JDK-8050964.js	Wed May 06 15:46:54 2015 +0200
     1.2 +++ b/test/script/nosecurity/JDK-8050964.js	Fri May 15 10:21:48 2015 +0200
     1.3 @@ -47,7 +47,7 @@
     1.4  }
     1.5  
     1.6  var javahome = System.getProperty("java.home");
     1.7 -var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater);
     1.8 +var jdepsPath = javahome + "/../bin/jdeps".replace(/\//g, File.separator);
     1.9  
    1.10  // run jdep on nashorn.jar - only summary but print profile info
    1.11  $ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin
     2.1 --- a/test/script/nosecurity/JDK-8055034.js	Wed May 06 15:46:54 2015 +0200
     2.2 +++ b/test/script/nosecurity/JDK-8055034.js	Fri May 15 10:21:48 2015 +0200
     2.3 @@ -48,7 +48,7 @@
     2.4  // we want to use nashorn.jar passed and not the one that comes with JRE
     2.5  var jjsCmd = javahome + "/../bin/jjs";
     2.6  jjsCmd += " -J-Djava.ext.dirs=" + nashornJarDir;
     2.7 -jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater);
     2.8 +jjsCmd = jjsCmd.toString().replace(/\//g, File.separator);
     2.9  $ENV.PWD=System.getProperty("user.dir") // to avoid RE on Cygwin
    2.10  $EXEC(jjsCmd, "var x = Object.create(null);\nx;\nprint('PASSED');\nexit(0)");
    2.11  

mercurial