test/sun/tools/jrunscript/jrunscript-DTest.sh

Print this page

        

*** 41,51 **** # test whether value specifieD by -D option is passed # to script as java.lang.System property. sysProps is # jrunscript shell built-in variable for System properties. ! ${JRUNSCRIPT} -Djrunscript.foo=bar <<EOF if (sysProps["jrunscript.foo"] == "bar") { println("Passed"); exit(0); } // unexpected value println("Unexpected System property value"); exit(1); EOF --- 41,51 ---- # test whether value specifieD by -D option is passed # to script as java.lang.System property. sysProps is # jrunscript shell built-in variable for System properties. ! ${JRUNSCRIPT} -J-Djava.awt.headless=true -Djrunscript.foo=bar <<EOF if (sysProps["jrunscript.foo"] == "bar") { println("Passed"); exit(0); } // unexpected value println("Unexpected System property value"); exit(1); EOF