Alias.sh revision 6073:cea72c2bf071
133965Sjdp#
2218822Sdim# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
3130561Sobrien# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4218822Sdim#
5218822Sdim# This code is free software; you can redistribute it and/or modify it
6218822Sdim# under the terms of the GNU General Public License version 2 only, as
7218822Sdim# published by the Free Software Foundation.
8218822Sdim#
9218822Sdim# This code is distributed in the hope that it will be useful, but WITHOUT
10218822Sdim# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11218822Sdim# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12218822Sdim# version 2 for more details (a copy is included in the LICENSE file that
13218822Sdim# accompanied this code).
14218822Sdim#
15218822Sdim# You should have received a copy of the GNU General Public License version
16218822Sdim# 2 along with this work; if not, write to the Free Software Foundation,
17218822Sdim# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18218822Sdim#
19218822Sdim# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20218822Sdim# or visit www.oracle.com if you need additional information or have any
21218822Sdim# questions.
22218822Sdim#
23218822Sdim
24218822Sdim# @test
25218822Sdim# @bug 4449491
26218822Sdim# @summary policytool should allow principal type to be empty
27218822Sdim#               (keystore alias substitution)
28218822Sdim#
29218822Sdim# @run applet/manual=done Alias.html
30218822Sdim# @run shell Alias.sh
31218822Sdim# @run applet/manual=yesno Alias.html
32218822Sdim
33218822Sdim# set a few environment variables so that the shell-script can run stand-alone
34218822Sdim# in the source directory
35218822Sdimif [ "${TESTSRC}" = "" ] ; then
36218822Sdim  TESTSRC="."
37218822Sdimfi
38218822Sdimif [ "${TESTCLASSES}" = "" ] ; then
39218822Sdim  TESTCLASSES="."
40218822Sdimfi
41218822Sdimif [ "${TESTJAVA}" = "" ] ; then
42218822Sdim  echo "TESTJAVA not set.  Test cannot execute."
43218822Sdim  echo "FAILED!!!"
44218822Sdim  exit 1
45218822Sdimfi
46218822Sdim
47218822Sdim# set platform-dependent variables
48218822SdimOS=`uname -s`
49218822Sdimcase "$OS" in
50218822Sdim  SunOS | Linux | Darwin )
51218822Sdim    NULL=/dev/null
52218822Sdim    PS=":"
53218822Sdim    FS="/"
54218822Sdim    ;;
55218822Sdim  Windows* )
56218822Sdim    NULL=NUL
57218822Sdim    PS=";"
58218822Sdim    FS="\\"
59218822Sdim    ;;
60218822Sdim  * )
61218822Sdim    echo "Unrecognized system!"
62218822Sdim    exit 1;
63218822Sdim    ;;
64218822Sdimesac
65218822Sdim
66218822Sdim# the test code
67218822Sdim
68218822Sdimecho "HELLO!"
69218822Sdim
70218822Sdim${TESTJAVA}${FS}bin${FS}policytool
71218822Sdim
72218822Sdimexit $?
73218822Sdim
74218822Sdim