Path: blob/master/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.sh
41153 views
# Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.1# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2#3# This code is free software; you can redistribute it and/or modify it4# under the terms of the GNU General Public License version 2 only, as5# published by the Free Software Foundation.6#7# This code is distributed in the hope that it will be useful, but WITHOUT8# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or9# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License10# version 2 for more details (a copy is included in the LICENSE file that11# accompanied this code).12#13# You should have received a copy of the GNU General Public License version14# 2 along with this work; if not, write to the Free Software Foundation,15# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.16#17# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA18# or visit www.oracle.com if you need additional information or have any19# questions.2021# @test22# @bug 6189812 6380357 6632886 824914223# @key intermittent24# @summary Verify that temporary font files are deleted on exit.2526if [ -z "${TESTSRC}" ]; then27echo "TESTSRC undefined: defaulting to ."28TESTSRC=.29fi3031if [ -z "${TESTCLASSES}" ]; then32echo "TESTCLASSES undefined: defaulting to ."33TESTCLASSES=.34fi3536if [ -z "${TESTJAVA}" ]; then37echo "TESTJAVA undefined: can't continue."38exit 139fi4041echo "TESTJAVA=${TESTJAVA}"42echo "TESTSRC=${TESTSRC}"43echo "TESTCLASSES=${TESTCLASSES}"44cd ${TESTSRC}45${TESTJAVA}/bin/javac -d ${TESTCLASSES} DeleteFont.java4647cd ${TESTCLASSES}4849numfiles0=`ls ${TESTCLASSES} | wc -l`50${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.io.tmpdir=${TESTCLASSES} DeleteFont5152if [ $? -ne 0 ]53then54echo "Test fails: exception thrown!"55exit 156fi5758numfiles1=`ls ${TESTCLASSES} | wc -l`5960if [ $numfiles0 -ne $numfiles1 ]61then62echo "Test fails: tmp file exists!"63ls ${TESTCLASSES}64exit 165fi66exit 0676869