Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable separate testing of encoding for both “pre-parsed” and “parsed” output #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sideshowbarker
Copy link
Contributor

@sideshowbarker sideshowbarker commented Aug 21, 2020

The changes in the PR branch add support for correctly testing both (1) the cases where the expected result is for character coding after fully parsing the test data, as well as (2) the cases where the expected result is for the output of the encoding sniffing algoritm — and in particular, the “prescan a byte stream to determine its encoding” algorithm (aka “meta scan”).

The support is implemented by making the internal sniffing limit settable.

Relates to #47
Relates to html5lib/html5lib-tests#130

@sideshowbarker sideshowbarker force-pushed the sideshowbarker/enable-metascan-only-testing branch from e030cce to e9803a2 Compare August 21, 2020 06:46
@sideshowbarker sideshowbarker force-pushed the sideshowbarker/enable-metascan-only-testing branch 2 times, most recently from 916186a to 0b01c6a Compare August 21, 2020 17:20
@sideshowbarker sideshowbarker changed the base branch from validator-nu to master August 21, 2020 17:21
@sideshowbarker sideshowbarker force-pushed the sideshowbarker/enable-metascan-only-testing branch from 2da023d to 41f3ec6 Compare August 30, 2020 09:45
This change adds a new EncodingPrescanTester class, the purpose of which
is to test the output of running just the meta prescan on test data —
that is, when the expected result is limited to what can be determined
by checking only the first 1024 bytes of the input stream.
@sideshowbarker sideshowbarker force-pushed the sideshowbarker/enable-metascan-only-testing branch from 41f3ec6 to 8822263 Compare September 2, 2021 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant