test/tools/launcher/UnicodeTest.sh

Print this page




  37 if [ "${TESTSRC}" = "" ]
  38 then
  39   echo "TESTSRC not set.  Test cannot execute.  Failed."
  40   exit 1
  41 fi
  42 
  43 if [ "${TESTCLASSES}" = "" ]
  44 then
  45   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
  46   exit 1
  47 fi
  48 
  49 JAVAC="${TESTJAVA}"/bin/javac
  50 JAVA="${TESTJAVA}"/bin/java
  51 JAR="${TESTJAVA}"/bin/jar
  52 
  53 mkdir UnicodeTest-src UnicodeTest-classes
  54 
  55 echo "creating test source files"
  56 "$JAVAC" -d . "${TESTSRC}"/UnicodeTest.java
  57 CLASS_NAME=`"$JAVA" UnicodeTest`
  58 
  59 if [ "$CLASS_NAME" = "" ]
  60 then
  61   echo "CLASS_NAME not generated.  Test failed."
  62   exit 1
  63 fi
  64 
  65 echo "building test apps"
  66 "$JAVAC" -encoding UTF-8 -sourcepath UnicodeTest-src \
  67     -d UnicodeTest-classes UnicodeTest-src/"${CLASS_NAME}".java || exit 1
  68 "$JAR" -cvfm UnicodeTest.jar UnicodeTest-src/MANIFEST.MF \
  69     -C UnicodeTest-classes . || exit 1
  70 
  71 echo "running test app using class file"
  72 "$JAVA" -classpath UnicodeTest-classes "$CLASS_NAME" || exit 1
  73 
  74 echo "delete generated files with non-ASCII names"
  75 # do it now because on Unix they may not be accessible when locale changes
  76 # do it in Java because shells on Windows can't handle full Unicode
  77 "$JAVAC" -d . "${TESTSRC}"/UnicodeCleanup.java || exit 1




  37 if [ "${TESTSRC}" = "" ]
  38 then
  39   echo "TESTSRC not set.  Test cannot execute.  Failed."
  40   exit 1
  41 fi
  42 
  43 if [ "${TESTCLASSES}" = "" ]
  44 then
  45   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
  46   exit 1
  47 fi
  48 
  49 JAVAC="${TESTJAVA}"/bin/javac
  50 JAVA="${TESTJAVA}"/bin/java
  51 JAR="${TESTJAVA}"/bin/jar
  52 
  53 mkdir UnicodeTest-src UnicodeTest-classes
  54 
  55 echo "creating test source files"
  56 "$JAVAC" -d . "${TESTSRC}"/UnicodeTest.java
  57 CLASS_NAME=`"$JAVA" UnicodeTest | sed -e 's@\\r@@g' `
  58 
  59 if [ "$CLASS_NAME" = "" ]
  60 then
  61   echo "CLASS_NAME not generated.  Test failed."
  62   exit 1
  63 fi
  64 
  65 echo "building test apps"
  66 "$JAVAC" -encoding UTF-8 -sourcepath UnicodeTest-src \
  67     -d UnicodeTest-classes UnicodeTest-src/"${CLASS_NAME}".java || exit 1
  68 "$JAR" -cvfm UnicodeTest.jar UnicodeTest-src/MANIFEST.MF \
  69     -C UnicodeTest-classes . || exit 1
  70 
  71 echo "running test app using class file"
  72 "$JAVA" -classpath UnicodeTest-classes "$CLASS_NAME" || exit 1
  73 
  74 echo "delete generated files with non-ASCII names"
  75 # do it now because on Unix they may not be accessible when locale changes
  76 # do it in Java because shells on Windows can't handle full Unicode
  77 "$JAVAC" -d . "${TESTSRC}"/UnicodeCleanup.java || exit 1