Skip to content

Commit 98fd522

Browse files
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 325abc3 commit 98fd522

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ private TokenizerTester(InputStream stream) throws TokenStreamException,
109109
driver.setNamePolicy(XmlViolationPolicy.ALLOW);
110110
driver.setXmlnsPolicy(XmlViolationPolicy.ALLOW);
111111
driver.setErrorHandler(tokenHandler);
112+
driver.dontSwallowBom();
112113
writer = new OutputStreamWriter(System.out, "UTF-8");
113114
JSONParser jsonParser = new JSONParser(new InputStreamReader(stream,
114115
"UTF-8"));

0 commit comments

Comments
 (0)