test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh

Print this page




 129       ${TESTJAVA}/bin/javac$ ./*.java ;
 130    fi
 131    # else in harness so copy all the class files from where jtreg put them
 132    # over to the scratch directory this test is running in. 
 133    else cp ${TESTCLASSES}/*.class . ;
 134 fi
 135 
 136 #if in test harness, then copy the entire directory that the test is in over 
 137 # to the scratch directory.  This catches any support files needed by the test.
 138 if [ -z "${STANDALONE}" ] ; 
 139    then cp ${TESTSRC}/* . 
 140 fi
 141 
 142 #Just before executing anything, make sure it has executable permission!
 143 chmod 777 ./*
 144 
 145 ###############  YOUR TEST CODE HERE!!!!!!!  #############
 146 
 147 case "$OS" in
 148   Windows* | CYGWIN* )
 149     ${TESTJAVA}/bin/java -Djava.awt.headless=true \
 150                          TestWrapped sun.awt.windows.WToolkit
 151     status=$?
 152     if [ ! $status -eq "0" ]; then
 153       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.windows.WToolkit";
 154     fi
 155     ${TESTJAVA}/bin/java -Djava.awt.headless=true \
 156                          -Dawt.toolkit=sun.awt.windows.WToolkit \
 157                          TestWrapped sun.awt.windows.WToolkit
 158     status=$?
 159     if [ ! $status -eq "0" ]; then
 160       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.windows.WToolkit";
 161     fi
 162     ;;
 163 
 164   SunOS | Linux )
 165     ${TESTJAVA}/bin/java -Djava.awt.headless=true \
 166                          -Dawt.toolkit=sun.awt.X11.XToolkit \
 167                          TestWrapped sun.awt.X11.XToolkit
 168     status=$?
 169     if [ ! $status -eq "0" ]; then
 170       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.xawt.XToolkit";
 171     fi
 172     AWT_TOOLKIT=XToolkit ${TESTJAVA}/bin/java -Djava.awt.headless=true \

 173                                               TestWrapped sun.awt.X11.XToolkit
 174     status=$?
 175     if [ ! $status -eq "0" ]; then
 176       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.xawt.XToolkit";
 177     fi
 178     ;;
 179 
 180   Darwin)
 181     ${TESTJAVA}/bin/java -Djava.awt.headless=true \
 182                          TestWrapped sun.lwawt.macosx.LWCToolkit
 183     status=$?
 184     if [ ! $status -eq "0" ]; then
 185       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit";
 186     fi
 187     ${TESTJAVA}/bin/java -Djava.awt.headless=true \
 188                          -Dawt.toolkit=sun.lwawt.macosx.LWCToolkit \
 189                          TestWrapped sun.lwawt.macosx.LWCToolkit
 190     status=$?
 191     if [ ! $status -eq "0" ]; then
 192       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit";
 193     fi
 194     ;;
 195 
 196 esac
 197 
 198 pass "All the tests are PASSED";
 199 
 200 #For additional examples of how to write platform independent KSH scripts,
 201 # see the jtreg file itself.  It is a KSH script for both Solaris and Win32


 129       ${TESTJAVA}/bin/javac$ ./*.java ;
 130    fi
 131    # else in harness so copy all the class files from where jtreg put them
 132    # over to the scratch directory this test is running in. 
 133    else cp ${TESTCLASSES}/*.class . ;
 134 fi
 135 
 136 #if in test harness, then copy the entire directory that the test is in over 
 137 # to the scratch directory.  This catches any support files needed by the test.
 138 if [ -z "${STANDALONE}" ] ; 
 139    then cp ${TESTSRC}/* . 
 140 fi
 141 
 142 #Just before executing anything, make sure it has executable permission!
 143 chmod 777 ./*
 144 
 145 ###############  YOUR TEST CODE HERE!!!!!!!  #############
 146 
 147 case "$OS" in
 148   Windows* | CYGWIN* )
 149     ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
 150                          TestWrapped sun.awt.windows.WToolkit
 151     status=$?
 152     if [ ! $status -eq "0" ]; then
 153       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.windows.WToolkit";
 154     fi
 155     ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
 156                          -Dawt.toolkit=sun.awt.windows.WToolkit \
 157                          TestWrapped sun.awt.windows.WToolkit
 158     status=$?
 159     if [ ! $status -eq "0" ]; then
 160       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.windows.WToolkit";
 161     fi
 162     ;;
 163 
 164   SunOS | Linux )
 165     ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
 166                          -Dawt.toolkit=sun.awt.X11.XToolkit \
 167                          TestWrapped sun.awt.X11.XToolkit
 168     status=$?
 169     if [ ! $status -eq "0" ]; then
 170       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.xawt.XToolkit";
 171     fi
 172     AWT_TOOLKIT=XToolkit ${TESTJAVA}/bin/java ${TESTVMOPTS} \
 173                                               -Djava.awt.headless=true \
 174                                               TestWrapped sun.awt.X11.XToolkit
 175     status=$?
 176     if [ ! $status -eq "0" ]; then
 177       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.xawt.XToolkit";
 178     fi
 179     ;;
 180 
 181   Darwin)
 182     ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
 183                          TestWrapped sun.lwawt.macosx.LWCToolkit
 184     status=$?
 185     if [ ! $status -eq "0" ]; then
 186       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit";
 187     fi
 188     ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
 189                          -Dawt.toolkit=sun.lwawt.macosx.LWCToolkit \
 190                          TestWrapped sun.lwawt.macosx.LWCToolkit
 191     status=$?
 192     if [ ! $status -eq "0" ]; then
 193       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit";
 194     fi
 195     ;;
 196 
 197 esac
 198 
 199 pass "All the tests are PASSED";
 200 
 201 #For additional examples of how to write platform independent KSH scripts,
 202 # see the jtreg file itself.  It is a KSH script for both Solaris and Win32