Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/jdk/java/awt/FontClass/CreateFont/DeleteFont.sh
41153 views
1
# Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
2
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
#
4
# This code is free software; you can redistribute it and/or modify it
5
# under the terms of the GNU General Public License version 2 only, as
6
# published by the Free Software Foundation.
7
#
8
# This code is distributed in the hope that it will be useful, but WITHOUT
9
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11
# version 2 for more details (a copy is included in the LICENSE file that
12
# accompanied this code).
13
#
14
# You should have received a copy of the GNU General Public License version
15
# 2 along with this work; if not, write to the Free Software Foundation,
16
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
#
18
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19
# or visit www.oracle.com if you need additional information or have any
20
# questions.
21
22
# @test
23
# @bug 6189812 6380357 6632886 8249142
24
# @key intermittent
25
# @summary Verify that temporary font files are deleted on exit.
26
27
if [ -z "${TESTSRC}" ]; then
28
echo "TESTSRC undefined: defaulting to ."
29
TESTSRC=.
30
fi
31
32
if [ -z "${TESTCLASSES}" ]; then
33
echo "TESTCLASSES undefined: defaulting to ."
34
TESTCLASSES=.
35
fi
36
37
if [ -z "${TESTJAVA}" ]; then
38
echo "TESTJAVA undefined: can't continue."
39
exit 1
40
fi
41
42
echo "TESTJAVA=${TESTJAVA}"
43
echo "TESTSRC=${TESTSRC}"
44
echo "TESTCLASSES=${TESTCLASSES}"
45
cd ${TESTSRC}
46
${TESTJAVA}/bin/javac -d ${TESTCLASSES} DeleteFont.java
47
48
cd ${TESTCLASSES}
49
50
numfiles0=`ls ${TESTCLASSES} | wc -l`
51
${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.io.tmpdir=${TESTCLASSES} DeleteFont
52
53
if [ $? -ne 0 ]
54
then
55
echo "Test fails: exception thrown!"
56
exit 1
57
fi
58
59
numfiles1=`ls ${TESTCLASSES} | wc -l`
60
61
if [ $numfiles0 -ne $numfiles1 ]
62
then
63
echo "Test fails: tmp file exists!"
64
ls ${TESTCLASSES}
65
exit 1
66
fi
67
exit 0
68
69