Skip to content

Commit 462005d

Browse files
sideshowbarkerhsivonen
authored andcommitted
Set dontSwallowBom for testharness
This change causes the dontSwallowBom() method to be called for the driver instance used in TokenizerTester. That causes any BOM at the beginning of test input to not be swallowed but instead preserved. Otherwise, without this change, the following html5lib-tests case fails: * https://github.com/html5lib/html5lib-tests/blob/master/tokenizer/domjs.test#L197 Relates to #35
1 parent a0c0a75 commit 462005d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test-src/nu/validator/htmlparser/test/TokenizerTester.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public TokenizerTester(InputStream stream) throws TokenStreamException,
111111
driver.setNamePolicy(XmlViolationPolicy.ALLOW);
112112
driver.setXmlnsPolicy(XmlViolationPolicy.ALLOW);
113113
driver.setErrorHandler(tokenHandler);
114+
driver.dontSwallowBom();
114115
writer = new OutputStreamWriter(System.out, "UTF-8");
115116
JSONParser jsonParser = new JSONParser(new InputStreamReader(stream,
116117
"UTF-8"));

0 commit comments

Comments
 (0)