3789983e89
Reviewed-by: darcy, ihse
22 lines
433 B
JavaScript
22 lines
433 B
JavaScript
/*
|
|
* This is the test JavaScript program used in jjs-argsTest.sh
|
|
*/
|
|
|
|
if (typeof(arguments) == 'undefined') {
|
|
throw new Error("arguments expected");
|
|
}
|
|
|
|
if (arguments.length != 2) {
|
|
throw new Error("2 arguments are expected here");
|
|
}
|
|
|
|
if (arguments[0] != 'hello') {
|
|
throw new Error("First arg should be 'hello'");
|
|
}
|
|
|
|
if (arguments[1] != 'world') {
|
|
throw new Error("Second arg should be 'world'");
|
|
}
|
|
|
|
print("Passed");
|