Fix the smoke test in the face of UTF-16 surrogate pairs.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
If the random data starts with a UTF-16 BOM *and* the next two bytes are for a character in the `\ud800`-`\udfff` range decoding would fail. Small chance, but still possible. Extend it to check the UTF-8 error as well. The goal is to test that the guesser was *mostly* correct, and to verify the cases where it wasn't that it was to be expected. Most of all that the function doesn't buckle under wildly unexpected data.
authored by Martijn Pieters · committed by Martijn Pieters · parent be01a35 · Browse files · 1 file+24 added−5 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+24 added−5 removed
- tests:+24 added−5 removed