author | mr |
Wed, 16 Jan 2019 16:27:21 -0800 | |
changeset 53372 | 4003935e6e5f |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
20488
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
1 |
/* |
43325
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
2 |
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. |
20488
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
4 |
* |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
8 |
* |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
13 |
* accompanied this code). |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
14 |
* |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
18 |
* |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
21 |
* questions. |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
22 |
*/ |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
23 |
|
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
24 |
/* |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
25 |
* @test |
43325
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
26 |
* @bug 8016110 8170832 |
20488
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
27 |
* @summary verify Japanese character in an argument are treated correctly |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
28 |
* @compile -XDignore.symbol.file I18NArgTest.java |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
29 |
* @run main I18NArgTest |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
30 |
*/ |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
31 |
import java.io.IOException; |
43325
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
32 |
import java.util.Map; |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
33 |
import java.util.HashMap; |
20488
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
34 |
|
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
35 |
public class I18NArgTest extends TestHelper { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
36 |
public static void main(String... args) throws IOException { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
37 |
if (!isWindows) { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
38 |
return; |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
39 |
} |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
40 |
if (!"MS932".equals(System.getProperty("sun.jnu.encoding"))) { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
41 |
System.err.println("MS932 encoding not set, test skipped"); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
42 |
return; |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
43 |
} |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
44 |
if (args.length == 0) { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
45 |
execTest(0x30bd); // MS932 Katakana SO, 0x835C |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
46 |
} else { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
47 |
testCharacters(args); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
48 |
} |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
49 |
} |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
50 |
static void execTest(int unicodeValue) { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
51 |
String hexValue = Integer.toHexString(unicodeValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
52 |
String unicodeStr = Character.toString((char)unicodeValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
53 |
execTest("\"" + unicodeStr + "\"", hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
54 |
execTest("\\" + unicodeStr + "\\", hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
55 |
execTest(" " + unicodeStr + " ", hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
56 |
execTest("'" + unicodeStr + "'", hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
57 |
execTest("\t" + unicodeStr + "\t", hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
58 |
execTest("*" + unicodeStr + "*", hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
59 |
execTest("?" + unicodeStr + "?", hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
60 |
|
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
61 |
execTest("\"" + unicodeStr + unicodeStr + "\"", hexValue + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
62 |
execTest("\\" + unicodeStr + unicodeStr + "\\", hexValue + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
63 |
execTest(" " + unicodeStr + unicodeStr + " ", hexValue + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
64 |
execTest("'" + unicodeStr + unicodeStr + "'", hexValue + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
65 |
execTest("\t" + unicodeStr + unicodeStr + "\t", hexValue + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
66 |
execTest("*" + unicodeStr + unicodeStr + "*", hexValue + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
67 |
execTest("?" + unicodeStr + unicodeStr + "?", hexValue + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
68 |
|
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
69 |
execTest("\"" + unicodeStr + "a" + unicodeStr + "\"", hexValue + "61" + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
70 |
execTest("\\" + unicodeStr + "a" + unicodeStr + "\\", hexValue + "61" + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
71 |
execTest(" " + unicodeStr + "a" + unicodeStr + " ", hexValue + "61"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
72 |
execTest("'" + unicodeStr + "a" + unicodeStr + "'", hexValue + "61"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
73 |
execTest("\t" + unicodeStr + "a" + unicodeStr + "\t", hexValue + "61"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
74 |
execTest("*" + unicodeStr + "a" + unicodeStr + "*", hexValue + "61"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
75 |
execTest("?" + unicodeStr + "a" + unicodeStr + "?", hexValue + "61"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
76 |
|
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
77 |
execTest("\"" + unicodeStr + "\u00b1" + unicodeStr + "\"", hexValue + "b1" + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
78 |
execTest("\\" + unicodeStr + "\u00b1" + unicodeStr + "\\", hexValue + "b1" + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
79 |
execTest(" " + unicodeStr + "\u00b1" + unicodeStr + " ", hexValue + "b1"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
80 |
execTest("'" + unicodeStr + "\u00b1" + unicodeStr + "'", hexValue + "b1"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
81 |
execTest("\t" + unicodeStr + "\u00b1" + unicodeStr + "\t", hexValue + "b1"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
82 |
execTest("*" + unicodeStr + "\u00b1" + unicodeStr + "*", hexValue + "b1"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
83 |
execTest("?" + unicodeStr + "\u00b1" + unicodeStr + "?", hexValue + "b1"+ hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
84 |
} |
43325
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
85 |
|
20488
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
86 |
static void execTest(String unicodeStr, String hexValue) { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
87 |
TestResult tr = doExec(javaCmd, |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
88 |
"-Dtest.src=" + TEST_SOURCES_DIR.getAbsolutePath(), |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
89 |
"-Dtest.classes=" + TEST_CLASSES_DIR.getAbsolutePath(), |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
90 |
"-cp", TEST_CLASSES_DIR.getAbsolutePath(), |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
91 |
"I18NArgTest", unicodeStr, hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
92 |
System.out.println(tr.testOutput); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
93 |
if (!tr.isOK()) { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
94 |
System.err.println(tr); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
95 |
throw new RuntimeException("test fails"); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
96 |
} |
43325
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
97 |
|
43691
f3c0d65c7b17
8173712: Rename JAVA_OPTIONS environment variable to JDK_JAVA_OPTIONS
mchung
parents:
43340
diff
changeset
|
98 |
// Test via JDK_JAVA_OPTIONS |
43325
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
99 |
Map<String, String> env = new HashMap<>(); |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
100 |
String cmd = "-Dtest.src=" + TEST_SOURCES_DIR.getAbsolutePath() + |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
101 |
" -Dtest.classes=" + TEST_CLASSES_DIR.getAbsolutePath() + |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
102 |
" -cp " + TEST_CLASSES_DIR.getAbsolutePath() + |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
103 |
" I18NArgTest " + unicodeStr + " " + hexValue; |
43691
f3c0d65c7b17
8173712: Rename JAVA_OPTIONS environment variable to JDK_JAVA_OPTIONS
mchung
parents:
43340
diff
changeset
|
104 |
env.put("JDK_JAVA_OPTIONS", cmd); |
43325
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
105 |
tr = doExec(env, javaCmd); |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
106 |
System.out.println(tr.testOutput); |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
107 |
if (!tr.isOK()) { |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
108 |
System.err.println(tr); |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
109 |
throw new RuntimeException("test fails"); |
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
110 |
} |
20488
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
111 |
} |
43325
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
20488
diff
changeset
|
112 |
|
20488
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
113 |
static void testCharacters(String... args) { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
114 |
String input = args[0]; |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
115 |
String expected = args[1]; |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
116 |
String hexValue = ""; |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
117 |
for (int i = 0; i < input.length(); i++) { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
118 |
hexValue = hexValue.concat(Integer.toHexString((int)input.charAt(i))); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
119 |
} |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
120 |
System.out.println("input:" + input); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
121 |
System.out.println("expected:" + expected); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
122 |
System.out.println("obtained:" + hexValue); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
123 |
if (!hexValue.contains(expected)) { |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
124 |
String message = "Error: output does not contain expected value" + |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
125 |
"expected:" + expected + " obtained:" + hexValue; |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
126 |
throw new RuntimeException(message); |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
127 |
} |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
128 |
} |
a2718559a91c
8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted
naoto
parents:
diff
changeset
|
129 |
} |