Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/SystemPropertiesTest/syspropstest.xml
6004 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2
3
<!--
4
Copyright (c) 2016, 2020 IBM Corp. and others
5
6
This program and the accompanying materials are made available under
7
the terms of the Eclipse Public License 2.0 which accompanies this
8
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
9
or the Apache License, Version 2.0 which accompanies this distribution and
10
is available at https://www.apache.org/licenses/LICENSE-2.0.
11
12
This Source Code may also be made available under the following
13
Secondary Licenses when the conditions for such availability set
14
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
15
General Public License, version 2 with the GNU Classpath
16
Exception [1] and GNU General Public License, version 2 with the
17
OpenJDK Assembly Exception [2].
18
19
[1] https://www.gnu.org/software/classpath/license.html
20
[2] http://openjdk.java.net/legal/assembly-exception.html
21
22
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
23
-->
24
25
<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">
26
27
<suite id="System Properties Converting Tests" timeout="200">
28
<variable name="ARGENABLE-UNI" value="-Xargencoding" />
29
<variable name="ARGENABLE-LATIN" value="-Xargencoding:latin" />
30
<variable name="ARGENABLE-UTF8" value="-Xargencoding:utf8" />
31
<variable name="LATIN" value="ISO-8859-1" />
32
<variable name="UTF8" value="UTF-8" />
33
<variable name="UNICODE" value="UNICODE" />
34
<variable name="DEFAULT" value="DEFAULT" />
35
36
<!--
37
The tests put non-ascii characters in system property name and value (which is also hardcoded in the test Java application)
38
defined via -D, and confirms the characters are converted correctly in the resulting system properties
39
using the current code page for the platform.
40
41
Usage of UNICODE parameter does make sense on Windows platforms only.
42
43
Attention
44
we use non-ascii symbols in command line option. According to XML rule they appear as &#153; &#254; and &#208;
45
Please do not delete it
46
-->
47
48
<test id="Test 1 Default Options">
49
<command>$EXE$ -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $DEFAULT$</command>
50
<output regex="no" type="success">test succeeded</output>
51
<output regex="no" type="required">test succeeded</output>
52
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
53
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
54
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
55
</test>
56
57
<test id="Test 2 Enable Argument Encoding with Unicode Option">
58
<command>$EXE$ $ARGENABLE-UNI$ -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $UNICODE$</command>
59
<output regex="no" type="success">test succeeded</output>
60
<output regex="no" type="required">test succeeded</output>
61
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
62
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
63
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
64
</test>
65
66
<test id="Test 3 Enable Argument Encoding with Latin Option">
67
<command>$EXE$ $ARGENABLE-LATIN$ -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $LATIN$</command>
68
<output regex="no" type="success">test succeeded</output>
69
<output regex="no" type="required">test succeeded</output>
70
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
71
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
72
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
73
</test>
74
75
<test id="Test 4 Enable Argument Encoding with UTF-8 Option">
76
<command>$EXE$ $ARGENABLE-UTF8$ -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $UTF8$</command>
77
<output regex="no" type="success">test succeeded</output>
78
<output regex="no" type="required">test succeeded</output>
79
<output regex="no" type="failure">test failed</output>
80
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
81
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
82
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
83
</test>
84
85
<test id="Test 5 Enable Argument Encoding and Property Converting Options">
86
<command>$EXE$ $ARGENABLE-LATIN$ -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $LATIN$</command>
87
<output regex="no" type="success">test succeeded</output>
88
<output regex="no" type="required">test succeeded</output>
89
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
90
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
91
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
92
</test>
93
94
<test id="Test 6 Enable Property Converting - No Argument Encoding">
95
<command>$EXE$ -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $DEFAULT$</command>
96
<output regex="no" type="success">test succeeded</output>
97
<output regex="no" type="required">test succeeded</output>
98
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
99
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
100
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
101
</test>
102
103
<test id="Test 7 detect invalid arguments">
104
<command>$EXE$ -Xargencodingfoo -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $DEFAULT$</command>
105
<output regex="no" type="success">JVMJ9VM007E Command-line option unrecognised</output>
106
<output regex="no" type="required">JVMJ9VM007E Command-line option unrecognised</output>
107
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
108
<output type="failure" caseSensitive="yes" regex="no">test succeeded</output>
109
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
110
</test>
111
112
<test id="Test 8 disregard Argument Encoding with random Option">
113
<command>$EXE$ -Xargencoding:foo -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $DEFAULT$</command>
114
<output regex="no" type="success">test succeeded</output>
115
<output regex="no" type="required">test succeeded</output>
116
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
117
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
118
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
119
</test>
120
121
<test id="Test 9 Test -Xnoargsconversion">
122
<command>$EXE$ -Xnoargsconversion -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $DEFAULT$</command>
123
<output regex="no" type="success">test succeeded</output>
124
<output regex="no" type="required">test succeeded</output>
125
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
126
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
127
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
128
</test>
129
130
<test id="Test 10 Test corrupt -Xnoargsencodings">
131
<command>$EXE$ -Xnoargsconversionfoo -Dtestkey=TestVa&#187;lue&#161; -cp $Q$$JARPATH$$Q$ SysPropTest $DEFAULT$</command>
132
<output regex="no" type="success">JVMJ9VM007E Command-line option unrecognised</output>
133
<output regex="no" type="required">JVMJ9VM007E Command-line option unrecognised</output>
134
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
135
<output type="failure" caseSensitive="yes" regex="no">test succeeded</output>
136
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
137
</test>
138
139
</suite>
140
141