file-in-help.sh revision 2117
1914N/A#
1914N/A# Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
1914N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1914N/A#
1914N/A# This code is free software; you can redistribute it and/or modify it
1914N/A# under the terms of the GNU General Public License version 2 only, as
1914N/A# published by the Free Software Foundation.
1914N/A#
1914N/A# This code is distributed in the hope that it will be useful, but WITHOUT
1914N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1914N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1914N/A# version 2 for more details (a copy is included in the LICENSE file that
1914N/A# accompanied this code).
1914N/A#
1914N/A# You should have received a copy of the GNU General Public License version
1914N/A# 2 along with this work; if not, write to the Free Software Foundation,
1914N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1914N/A#
1914N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
1914N/A# CA 95054 USA or visit www.sun.com if you need additional information or
1914N/A# have any questions.
1914N/A#
1914N/A
1914N/A# @test
1914N/A# @bug 6922482
1914N/A# @summary keytool's help on -file always shows 'output file'
1914N/A#
1914N/A
1914N/Aif [ "${TESTJAVA}" = "" ] ; then
1914N/A JAVAC_CMD=`which javac`
1914N/A TESTJAVA=`dirname $JAVAC_CMD`/..
1914N/Afi
1914N/A
1914N/A# set platform-dependent variables
1914N/AOS=`uname -s`
1914N/Acase "$OS" in
1914N/A Windows_* )
1914N/A FS="\\"
1914N/A ;;
1914N/A * )
1914N/A FS="/"
1914N/A ;;
1914N/Aesac
1914N/A
1914N/ALANG=C
1914N/A$TESTJAVA${FS}bin${FS}keytool -printcertreq -help 2> h1 || exit 1
1914N/A$TESTJAVA${FS}bin${FS}keytool -exportcert -help 2> h2 || exit 2
1914N/A
1914N/Agrep "input file" h1 || exit 3
1914N/Agrep "output file" h2 || exit 4
1914N/A
1914N/Aexit 0
1914N/A
1914N/A