equal
deleted
inserted
replaced
23 |
23 |
24 /** |
24 /** |
25 * JDK-8144113: Nashorn: enable jjs testing. |
25 * JDK-8144113: Nashorn: enable jjs testing. |
26 * @test |
26 * @test |
27 * @option -scripting |
27 * @option -scripting |
28 * @runif os.not.windows |
|
29 * @run |
28 * @run |
30 * @summary Test -scripting flag and its basic functionality |
29 * @summary Test -scripting flag and its basic functionality |
31 */ |
30 */ |
32 |
31 |
33 load(__DIR__ + "jjs-common.js") |
32 load(__DIR__ + "jjs-common.js") |
38 // code to check basic functionality |
37 // code to check basic functionality |
39 var msg_func = <<'EOD' |
38 var msg_func = <<'EOD' |
40 var x = "Nashorn" |
39 var x = "Nashorn" |
41 var hello = "Hello ${x}" |
40 var hello = "Hello ${x}" |
42 if (hello != "Hello Nashorn") { |
41 if (hello != "Hello Nashorn") { |
43 throw new Error("string interploation not working"); |
42 throw new Error("string interploation not working") |
44 } |
43 } |
45 EOD |
44 EOD |
46 |
45 |
47 // flag test expected output variables |
46 // flag test expected output variables |
48 var e_outn = 'ReferenceErrorr: "$OPTIONS" is not defined' |
47 var e_outn = 'ReferenceErrorr: "$OPTIONS" is not defined' |