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

Add support for OCaml 5.00 #92

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Conversation

kit-ty-kate
Copy link
Contributor

No description provided.

@gildor478 gildor478 merged commit 9345a47 into gildor478:master Feb 8, 2022
Leonidas-from-XIV added a commit to Leonidas-from-XIV/ounit that referenced this pull request Jun 28, 2022
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.
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.

2 participants