jdk-24/jdk/test/tools/jjs/scripting.js
Athijegannathan Sundararajan 4ab55ae7c1 8145750: jjs fails to run simple scripts with security manager turned on
Reviewed-by: hannesw, alanb
2015-12-21 09:40:00 +05:30

19 lines
372 B
JavaScript

/*
* This is the test JavaScript program used in jjs-scriptingTest.sh
*/
var str = <<END
Multi line string
works in scripting
END
var n = "Nashorn";
var hello = "Hello, ${n}";
if (hello != "Hello, Nashorn") {
throw new Error("string interpolation didn't work");
}
if (typeof readFully != "function") {
throw new Error("readFully is defined in -scripting");
}