Closed dbwiddis closed 10 months ago
Almost there... only the Windows runner reports:
...
[INFO] UTF-8 degree sign is °
...
[ERROR] Expected lines don't match this build.log!
> fast-forward(∞) didn't find: `\Q[INFO]\E UTF-8[...]`
...
Almost there... only the Windows runner reports ...
Yeah, I based my test on a UTF-8 character (0xc2b0
) but the UTF-16 byte implementation (0x00b0
) is different so it results in different output in ISO-8859-1. So I need to find a non-ASCII character with the same 2-byte UTF-8 and UTF-16 implementation, or maybe use a regex to allow either c2 or 00 for that byte.
[...] or maybe use a regex to allow either c2 or 00 for that byte.
Fine with me.
Turns out the ISO charset just skips null bytes so this works out to an optional \uc2
character in the regex.
OK, I think I'm done... the MIE is thrown in Files.lines()
so isn't caught by the log reading IOException (which looks like it just warns and doesn't fail the test). Can add it to the outer catch but then it doesn't have access to exitValue. I expanded the scope of exit value but perhaps it's a better idea to keep the original try/catch for the log reading and wrap a try-with-resources block inside that (with no catch block).
OK I really am done now, unless you have changes requested. :)
Allows user to override Java default charset when printing logs, to work around MalformedInputExceptions.
Fixes #115
This contribution is my original work and I license the work to the project under the project's open source license.