Skip to content

Commit 2e3b36c

Browse files
committed
adjust test cases
1 parent ee782ac commit 2e3b36c

6 files changed

Lines changed: 28 additions & 28 deletions

File tree

src/test/java/org/htmlunit/cyberneko/EvaluateInputSourceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ public void plaintext() throws Exception {
100100
+ "(script" + NL
101101
+ ")script" + NL
102102
+ ")head" + NL
103-
+ "(BODY" + NL
103+
+ "(body" + NL
104104
+ "(plaintext" + NL
105105
+ "\"foo<title>Test</title></head><body> bar</body></html>" + NL
106106
+ ")plaintext" + NL
107-
+ ")BODY" + NL
107+
+ ")body" + NL
108108
+ ")html";
109109

110110
doTest(html, htmlEval, expected);

src/test/java/org/htmlunit/cyberneko/FragmentContextStackTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ public void simple() throws Exception {
4242

4343
expected = "(head" + NL
4444
+ ")head" + NL
45-
+ "(BODY" + NL
45+
+ "(body" + NL
4646
+ "(div" + NL
4747
+ "(span" + NL
4848
+ "\"hello" + NL
4949
+ ")span" + NL
5050
+ ")div" + NL
51-
+ ")BODY" + NL;
51+
+ ")body" + NL;
5252
GeneralTest.doTest("<div><span>hello</span>", new String[] {"html"}, expected, FEATURES);
5353
}
5454

@@ -61,9 +61,9 @@ public void tr() throws Exception {
6161
+ ")tr" + NL;
6262
GeneralTest.doTest("<tr><td>hello</td></tr>",
6363
new String[] {"html", "body", "table", "tbody"}, expected, FEATURES);
64-
expected = "(TBODY" + NL
64+
expected = "(tbody" + NL
6565
+ expected
66-
+ ")TBODY\n";
66+
+ ")tbody\n";
6767
GeneralTest.doTest("<tr><td>hello</td></tr>", new String[] {"html", "body", "table"}, expected, FEATURES);
6868
GeneralTest.doTest("<tr><td>hello</td></tr>", new String[] {"html", "body"}, "\"hello", FEATURES);
6969
}

src/test/java/org/htmlunit/cyberneko/GeneralTest.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ public class GeneralTest {
4646
@Test
4747
public void newlineInAttributeCrLf() throws Exception {
4848
String expected =
49-
"[synth](HTML" + NL
49+
"[synth](html" + NL
5050
+ "[synth](head" + NL
5151
+ "[synth])head" + NL
52-
+ "[synth](BODY" + NL
52+
+ "[synth](body" + NL
5353
+ "[1,1,0;1,11,10]\"some text " + NL
5454
+ "[1,11,10;2,23,52](span" + NL
5555
+ "Aclass value\\ncontaining a newline" + NL
5656
+ "[2,23,52;2,34,63]\"spancontent" + NL
5757
+ "[2,34,63;2,41,70])span" + NL
58-
+ "[synth])BODY" + NL
59-
+ "[synth])HTML" + NL;
58+
+ "[synth])body" + NL
59+
+ "[synth])html" + NL;
6060
doTest("some text <span class='value\r\n"
6161
+ "containing a newline'>spancontent</span>", new String[] {}, expected,
6262
FEATURES);
@@ -89,17 +89,17 @@ public void newlineInAttributeCrLf() throws Exception {
8989
@Test
9090
public void newlineInAttributeLf() throws Exception {
9191
String expected =
92-
"[synth](HTML" + NL
92+
"[synth](html" + NL
9393
+ "[synth](head" + NL
9494
+ "[synth])head" + NL
95-
+ "[synth](BODY" + NL
95+
+ "[synth](body" + NL
9696
+ "[1,1,0;1,11,10]\"some text " + NL
9797
+ "[1,11,10;2,23,51](span" + NL
9898
+ "Aclass value\\ncontaining a newline" + NL
9999
+ "[2,23,51;2,34,62]\"spancontent" + NL
100100
+ "[2,34,62;2,41,69])span" + NL
101-
+ "[synth])BODY" + NL
102-
+ "[synth])HTML" + NL;
101+
+ "[synth])body" + NL
102+
+ "[synth])html" + NL;
103103
doTest("some text <span class='value\n"
104104
+ "containing a newline'>spancontent</span>", new String[] {}, expected,
105105
FEATURES);
@@ -132,15 +132,15 @@ public void newlineInAttributeLf() throws Exception {
132132
@Test
133133
public void newlineInPiCrLf() throws Exception {
134134
String expected =
135-
"[synth](HTML" + NL
135+
"[synth](html" + NL
136136
+ "[synth](head" + NL
137137
+ "[synth])head" + NL
138138
+ "[synth](body" + NL
139139
+ "[1,1,0;1,11,10]\"some text " + NL
140140
+ "[1,11,10;2,23,63]?instruct beforenl='content'\\n afternl=\"content\" " + NL
141141
+ "[2,23,63;3,1,74]\"more text\\n" + NL
142142
+ "[synth])body" + NL
143-
+ "[synth])HTML" + NL;
143+
+ "[synth])html" + NL;
144144
doTest("some text <?instruct beforenl='content'\r\n"
145145
+ " afternl=\"content\" ?>more text\r\n", new String[] {}, expected,
146146
FEATURES);
@@ -169,15 +169,15 @@ public void newlineInPiCrLf() throws Exception {
169169
@Test
170170
public void newlineInPiLf() throws Exception {
171171
String expected =
172-
"[synth](HTML" + NL
172+
"[synth](html" + NL
173173
+ "[synth](head" + NL
174174
+ "[synth])head" + NL
175175
+ "[synth](body" + NL
176176
+ "[1,1,0;1,11,10]\"some text " + NL
177177
+ "[1,11,10;2,23,62]?instruct beforenl='content'\\n afternl=\"content\" " + NL
178178
+ "[2,23,62;3,1,73]\"more text\\n" + NL
179179
+ "[synth])body" + NL
180-
+ "[synth])HTML" + NL;
180+
+ "[synth])html" + NL;
181181
doTest("some text <?instruct beforenl='content'\n"
182182
+ " afternl=\"content\" ?>more text\r\n", new String[] {}, expected,
183183
FEATURES);
@@ -248,7 +248,7 @@ public void parseInputSourceReplacement() throws Exception {
248248
in.setEncoding("replacement");
249249
parser.parse(in);
250250

251-
final String expected = "(HTML" + NL
251+
final String expected = "(html" + NL
252252
+ "(head" + NL
253253
+ ")head" + NL
254254
+ "(body" + NL
@@ -271,7 +271,7 @@ public void parseInputSourceResolvesToReplacement() throws Exception {
271271
in.setEncoding("csiso2022kr");
272272
parser.parse(in);
273273

274-
final String expected = "(HTML" + NL
274+
final String expected = "(html" + NL
275275
+ "(head" + NL
276276
+ ")head" + NL
277277
+ "(body" + NL
@@ -303,7 +303,7 @@ public void parseInputSourceIANAEncoding() throws Exception {
303303
// expected
304304
}
305305

306-
final String expected = "(HTML" + NL
306+
final String expected = "(html" + NL
307307
+ "(head" + NL
308308
+ ")head" + NL
309309
+ "(body" + NL

src/test/java/org/htmlunit/cyberneko/HTMLScannerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public void invalidProcessingInstruction() throws Exception {
263263
final XMLInputSource source = new XMLInputSource(null, "myTest", null, new StringReader(string), "UTF-8");
264264
parser.parse(source);
265265

266-
final String[] expected = {"(HTML", "(head", ")head", "(body", ")body", ")html"};
266+
final String[] expected = {"(html", "(head", ")head", "(body", ")body", ")html"};
267267
assertEquals(Arrays.asList(expected).toString(), filter.getCollectedStrings().toString());
268268
}
269269

@@ -281,7 +281,7 @@ public void invalidProcessingInstruction2() throws Exception {
281281
final XMLInputSource source = new XMLInputSource(null, "myTest", null, new StringReader(string), "UTF-8");
282282
parser.parse(source);
283283

284-
final String[] expected = {"(HTML", "(head", ")head", "(body", ")body", ")html"};
284+
final String[] expected = {"(html", "(head", ")head", "(body", ")body", ")html"};
285285
assertEquals(Arrays.asList(expected).toString(), filter.getCollectedStrings().toString());
286286
}
287287

@@ -299,7 +299,7 @@ public void invalidProcessingInstruction3() throws Exception {
299299
final XMLInputSource source = new XMLInputSource(null, "myTest", null, new StringReader(string), "UTF-8");
300300
parser.parse(source);
301301

302-
final String[] expected = {"(HTML", "(head", ")head", "(body", ")body", ")html"};
302+
final String[] expected = {"(html", "(head", ")head", "(body", ")body", ")html"};
303303
assertEquals(Arrays.asList(expected).toString(), filter.getCollectedStrings().toString());
304304
}
305305

src/test/java/org/htmlunit/cyberneko/HTMLTagBalancingListenerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public void reuse() throws Exception {
7878

7979
parser.parse(in);
8080

81-
final String[] expectedMessages = {"start HTML", "start head", "start title", "end title", "end head",
82-
"start body", "start div", "end div", "end body", "end HTML"};
81+
final String[] expectedMessages = {"start html", "start head", "start title", "end title", "end head",
82+
"start body", "start div", "end div", "end body", "end html"};
8383

8484
assertEquals(Arrays.asList(expectedMessages).toString(), parser.getMessages().toString());
8585

src/test/java/org/htmlunit/cyberneko/xerces/xni/XMLStringTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ public void prepend() {
696696

697697
// just push something into the string to see if we have growth pain
698698
final XMLString b = new XMLString("foo");
699-
StringBuilder exB = new StringBuilder("foo");
699+
final StringBuilder exB = new StringBuilder("foo");
700700
final String src = "This is a test of the prepending";
701701
for (int i = 0; i < src.length(); i++) {
702702
final char c = src.charAt(i);
@@ -1379,7 +1379,7 @@ public void equalsIgnoreCase_NoMatch() {
13791379
}
13801380

13811381
/**
1382-
* @see XMLString#toLowerCase(Locale)
1382+
* @see XMLString#toLowerCase(Locale)
13831383
*/
13841384
@ParameterizedTest
13851385
@ValueSource(strings = {

0 commit comments

Comments
 (0)