1 /*
   2  * This is the test JavaScript program used in jjs-argsTest.sh
   3  */
   4 
   5 if (typeof(arguments) == 'undefined') {
   6     throw new Error("arguments expected");
   7 }
   8 
   9 if (arguments.length != 2) {
  10     throw new Error("2 arguments are expected here");
  11 }
  12 
  13 if (arguments[0] != 'hello') {
  14     throw new Error("First arg should be 'hello'");
  15 }
  16 
  17 if (arguments[1] != 'world') {
  18     throw new Error("Second arg should be 'world'");
  19 }
  20 
  21 print("Passed");