1 /*
   2  * This is the test JavaScript program used in jjs-modulepathTest.sh
   3  */
   4 
   5 print("--module-path passed: " + $OPTIONS._module_path);
   6 print("--add-modules passed: " + $OPTIONS._add_modules);
   7 
   8 if ($OPTIONS._add_modules != "java.base,com.greetings") {
   9     throw new Error("--add-modules values are not merged!");
  10 }
  11 
  12 var Hello = com.greetings.Hello;
  13 
  14 var moduleName = Hello.class.module.name;
  15 if (moduleName != "com.greetings") {
  16     throw new Error("Expected module name to be com.greetings");
  17 }