Newlines.sh revision 1147
70N/A#
70N/A# Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
70N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
70N/A#
371N/A# This code is free software; you can redistribute it and/or modify it
70N/A# under the terms of the GNU General Public License version 2 only, as
70N/A# published by the Free Software Foundation.
70N/A#
70N/A# This code is distributed in the hope that it will be useful, but WITHOUT
70N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
70N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
70N/A# version 2 for more details (a copy is included in the LICENSE file that
70N/A# accompanied this code).
70N/A#
70N/A# You should have received a copy of the GNU General Public License version
70N/A# 2 along with this work; if not, write to the Free Software Foundation,
70N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
70N/A#
70N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
70N/A# or visit www.oracle.com if you need additional information or have any
70N/A# questions.
70N/A#
70N/A
70N/A# @test
70N/A# @bug 4110560 4785453
70N/A# @summary portability : javac.properties
70N/A#
70N/A# @run shell Newlines.sh
70N/A
70N/Aif [ "${TESTSRC}" = "" ]
70N/Athen
70N/A echo "TESTSRC not set. Test cannot execute. Failed."
493N/A exit 1
70N/Afi
70N/Aecho "TESTSRC=${TESTSRC}"
70N/Aif [ "${TESTJAVA}" = "" ]
493N/Athen
70N/A echo "TESTJAVA not set. Test cannot execute. Failed."
70N/A exit 1
493N/Afi
70N/Aecho "TESTJAVA=${TESTJAVA}"
70N/Aif [ "${TESTCLASSES}" = "" ]
371N/Athen
70N/A echo "TESTCLASSES not set. Test cannot execute. Failed."
70N/A exit 1
70N/Afi
70N/Aecho "TESTCLASSES=${TESTCLASSES}"
70N/Aecho "CLASSPATH=${CLASSPATH}"
70N/A
70N/A# set platform-dependent variables
493N/AOS=`uname -s`
70N/Acase "$OS" in
70N/A SunOS | Linux | Darwin | CYGWIN* )
493N/A FS="/"
70N/A ;;
70N/A Windows* )
70N/A FS="\\"
70N/A ;;
192N/A * )
493N/A echo "Unrecognized system!"
192N/A exit 1;
70N/A ;;
esac
TMP1=OUTPUT.txt
"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -J-Dline.separator='@' > ${TMP1} 2>&1
cat ${TMP1}
result=`cat ${TMP1} | wc -l`
if [ "$result" -eq 0 ]
then
echo "Passed"
else
echo "Failed"
fi
exit $result