author | phh |
Sat, 30 Nov 2019 14:33:05 -0800 | |
changeset 59330 | 5b96c12f909d |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
34721
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
1 |
/* |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
2 |
* This is the test JavaScript program used in jjs-DTest.sh |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
3 |
*/ |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
4 |
|
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
5 |
var Sys = java.lang.System; |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
6 |
if (Sys.getProperty("jjs.foo") == "bar") { |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
7 |
print("Passed"); |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
8 |
} else { |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
9 |
// unexpected value |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
10 |
throw new Error("Unexpected System property value"); |
59801fbd042e
8145750: jjs fails to run simple scripts with security manager turned on
sundar
parents:
diff
changeset
|
11 |
} |