jdk/test/java/awt/PrintJob/Text/stringwidth.sh
author serb
Tue, 12 Nov 2013 20:24:25 +0400
changeset 21596 0e3a39f29dbc
parent 2 90ce3da70b43
child 22965 78610fb00fff
permissions -rw-r--r--
8027696: Incorrect copyright header in the tests Reviewed-by: alanb, malenkov, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#!/bin/ksh -p
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
#
21596
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
     3
# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
     5
#
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
     8
# published by the Free Software Foundation.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
     9
#
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    10
# This code is distributed in the hope that it will be useful, but WITHOUT
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    13
# version 2 for more details (a copy is included in the LICENSE file that
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    14
# accompanied this code).
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    15
#
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    16
# You should have received a copy of the GNU General Public License version
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    17
# 2 along with this work; if not, write to the Free Software Foundation,
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    18
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    19
#
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    20
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    21
# or visit www.oracle.com if you need additional information or have any
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    22
# questions.
0e3a39f29dbc 8027696: Incorrect copyright header in the tests
serb
parents: 2
diff changeset
    23
#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#   @test      
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
#   @bug        4692562
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#   @summary    Requirement: Windows with printer installed.  It should print with text "Hello World".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
#   @compile StringWidth.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#   @run shell/manual stringwidth.sh
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
OS=`uname`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
status=1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
checkstatus()
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
  status=$?
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
  if [ $status -ne "0" ]; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    exit "$status"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
  fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
# pick up the compiled class files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
if [ -z "${TESTCLASSES}" ]; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
  CP="."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
  CP="${TESTCLASSES}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
if [ $OS = SunOS -o $OS = Linux ]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    exit 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
# Windows
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
if [ -z "${TESTJAVA}" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
   JAVA_HOME=../../../../../../build/windows-i586
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
   JAVA_HOME=$TESTJAVA
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    $JAVA_HOME/bin/java -cp "${CP}" StringWidth
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    checkstatus
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
exit 0