test/tools/apt/Compile/compile.sh

Print this page




  50 TestFile() {
  51         if [ ! -f ${1} ]; then
  52                 printf "%s\n" "File ${1} not found."
  53                 exit 1
  54         fi
  55 }
  56 
  57 
  58 OS=`uname -s`;
  59 case "${OS}" in
  60         Windows* | CYGWIN* )
  61                 SEP=";"
  62         ;;
  63 
  64         * )
  65         SEP=":"
  66         ;;
  67 esac
  68 
  69 
  70 APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} "
  71 JAVA="${TESTJAVA}/bin/java ${TESTVMOPTS} "
  72 JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} "
  73 
  74 unset CLASSPATH
  75 
  76 
  77 # ---------------------------------------------------------------
  78 echo "Verify that source 1.6 is not supported
  79 rm -f HelloWorld.class
  80 
  81 printf "%s\n" "-source 1.6"     > options0
  82 printf "%s\n" "${TESTSRC}/HelloWorld.java"  >> options0
  83 ${APT} @options0
  84 
  85 RESULT=$?
  86 case "$RESULT" in
  87         0  )
  88         echo "FAILED: accepted source 1.6"
  89         exit 1
  90         ;;




  50 TestFile() {
  51         if [ ! -f ${1} ]; then
  52                 printf "%s\n" "File ${1} not found."
  53                 exit 1
  54         fi
  55 }
  56 
  57 
  58 OS=`uname -s`;
  59 case "${OS}" in
  60         Windows* | CYGWIN* )
  61                 SEP=";"
  62         ;;
  63 
  64         * )
  65         SEP=":"
  66         ;;
  67 esac
  68 
  69 
  70 APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} -XDsuppress-tool-api-removal-message "
  71 JAVA="${TESTJAVA}/bin/java ${TESTVMOPTS} "
  72 JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} "
  73 
  74 unset CLASSPATH
  75 
  76 
  77 # ---------------------------------------------------------------
  78 echo "Verify that source 1.6 is not supported
  79 rm -f HelloWorld.class
  80 
  81 printf "%s\n" "-source 1.6"     > options0
  82 printf "%s\n" "${TESTSRC}/HelloWorld.java"  >> options0
  83 ${APT} @options0
  84 
  85 RESULT=$?
  86 case "$RESULT" in
  87         0  )
  88         echo "FAILED: accepted source 1.6"
  89         exit 1
  90         ;;