test/sun/tools/jrunscript/jrunscript-cpTest.sh
Print this page
*** 44,54 ****
# we check whether classpath setting for app classes
# work with jrunscript. Script should be able to
# access Java class "Hello".
! ${JRUNSCRIPT} -cp . <<EOF
var v;
try { v = new Packages.Hello(); } catch (e) { println(e); exit(1) }
if (v.string != 'hello') { println("Unexpected property value"); exit(1); }
EOF
--- 44,54 ----
# we check whether classpath setting for app classes
# work with jrunscript. Script should be able to
# access Java class "Hello".
! ${JRUNSCRIPT} -l nashorn -cp . <<EOF
var v;
try { v = new Packages.Hello(); } catch (e) { println(e); exit(1) }
if (v.string != 'hello') { println("Unexpected property value"); exit(1); }
EOF
*** 56,66 ****
exit 1
fi
# -classpath and -cp are synonyms
! ${JRUNSCRIPT} -classpath . <<EOF
var v;
try { v = new Packages.Hello(); } catch (e) { println(e); exit(1) }
if (v.string != 'hello') { println("unexpected property value"); exit(1); }
EOF
--- 56,66 ----
exit 1
fi
# -classpath and -cp are synonyms
! ${JRUNSCRIPT} -l nashorn -classpath . <<EOF
var v;
try { v = new Packages.Hello(); } catch (e) { println(e); exit(1) }
if (v.string != 'hello') { println("unexpected property value"); exit(1); }
EOF