J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame^] | 1 | #!/bin/ksh -p |
| 2 | # |
| 3 | # @test |
| 4 | # @bug 4692562 |
| 5 | # @summary Requirement: Windows with printer installed. It should print with text "Hello World". |
| 6 | # @compile StringWidth.java |
| 7 | # @run shell/manual stringwidth.sh |
| 8 | # |
| 9 | OS=`uname` |
| 10 | |
| 11 | status=1 |
| 12 | checkstatus() |
| 13 | { |
| 14 | status=$? |
| 15 | if [ $status -ne "0" ]; then |
| 16 | exit "$status" |
| 17 | fi |
| 18 | } |
| 19 | |
| 20 | # pick up the compiled class files. |
| 21 | if [ -z "${TESTCLASSES}" ]; then |
| 22 | CP="." |
| 23 | else |
| 24 | CP="${TESTCLASSES}" |
| 25 | fi |
| 26 | |
| 27 | |
| 28 | if [ $OS = SunOS -o $OS = Linux ] |
| 29 | then |
| 30 | exit 0 |
| 31 | fi |
| 32 | # Windows |
| 33 | |
| 34 | if [ -z "${TESTJAVA}" ] ; then |
| 35 | JAVA_HOME=../../../../../../build/windows-i586 |
| 36 | else |
| 37 | JAVA_HOME=$TESTJAVA |
| 38 | fi |
| 39 | |
| 40 | $JAVA_HOME/bin/java -cp "${CP}" StringWidth |
| 41 | checkstatus |
| 42 | |
| 43 | exit 0 |