test/jdk/javax/script/Test7.js
author ssadetsky
Wed, 03 Apr 2019 15:43:25 -0700
branchJDK-8200758-branch
changeset 57303 eff0cf668c29
parent 47216 71c04702a3d5
permissions -rw-r--r--
8221876:[macOS] JPackage install takes long time Reviewed-by: almatvee
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);