jdk/test/javax/script/Test7.js
author mchung
Mon, 27 Oct 2014 13:45:39 -0700
changeset 27260 8d82d0e9556b
parent 16038 de84354579d3
permissions -rw-r--r--
8043277: Update jdk regression tests to extend the default security policy instead of override Reviewed-by: alanb, mullan, chegar, sla
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
//this is the first line of Test7.js
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
var filename;
16038
de84354579d3 8009115: jtreg tests under jdk/test/javax/script should use nashorn as script engine
sundar
parents: 2
diff changeset
     3
try {
de84354579d3 8009115: jtreg tests under jdk/test/javax/script should use nashorn as script engine
sundar
parents: 2
diff changeset
     4
    load("nashorn:mozilla_compat.js");
de84354579d3 8009115: jtreg tests under jdk/test/javax/script should use nashorn as script engine
sundar
parents: 2
diff changeset
     5
} catch (e) {
de84354579d3 8009115: jtreg tests under jdk/test/javax/script should use nashorn as script engine
sundar
parents: 2
diff changeset
     6
    //ignored
de84354579d3 8009115: jtreg tests under jdk/test/javax/script should use nashorn as script engine
sundar
parents: 2
diff changeset
     7
}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
importPackage(java.io);
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
importPackage(java);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
var f = new File(filename);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
var r = new BufferedReader(new InputStreamReader(new FileInputStream(f)));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
16038
de84354579d3 8009115: jtreg tests under jdk/test/javax/script should use nashorn as script engine
sundar
parents: 2
diff changeset
    13
var firstLine = r.readLine();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
print(firstLine);