testlib
testlib copied to clipboard
fix: don't skip BOM on standard streams, fix #160
Standard streams does not need to skip BOM, otherwise it will cause infinite waiting (blocking) in interactions.
Maybe we could check whether the file descriptor is a normal file or not and only skipBom for normal files?
I think it is possible to check if the input stream ends when trying to skip BOM, instead of waiting for a BOM header forever.
I prefer to use skipBom only in checker-mode for outputs (where it actually can be usefull). Also added tests, see https://github.com/MikeMirzayanov/testlib/commit/139afc4c51c7439a5dda105690452faf36f75b88