Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In gildor478#92 @kit-ty-kate added support for the `Seq` API instead of the Stream API to be compatible with OCaml 5, which is very convenient, as we are approaching a release. While attempting to port the `gettext` unit tests which use `assert_command` I ran into the issue that migrating the tests to the `Seq` API was simple but they were always failing with an `End_of_file` exception. Upon further inspection I realized the issue must be in ounit, and indeed: the previous code used `Stream.of_channel` which presumably handled `End_of_file` while the new `Seq` API would build an infinite `Seq`, attempting to read from the end of a channel, even if it was already at the end. This changes the code to implement a functionality similar to `Stream.of_channel`. Attempting to run the `gettext` unit tests succeeds without issues with this patch.
- Loading branch information