-
Notifications
You must be signed in to change notification settings - Fork 99
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
Simplify expect tests #470
Conversation
Signed-off-by: Nathan Rebours <[email protected]>
I should've opened this as draft, I wanted to see the CI run to test the 5.1.0 thing and make sure it was working alright! |
It seems to be working fine! This should be ready to review! |
Signed-off-by: Nathan Rebours <[email protected]>
There is something incredibly fishy going on here, even with the trimming we end up with a leading empty line in some cases. I'll look into it! |
410c26c
to
153e457
Compare
Got it, errors are reported by another printer, I'll try fixing this one as well! |
Signed-off-by: Nathan Rebours <[email protected]>
Signed-off-by: Nathan Rebours <[email protected]>
153e457
to
117ee2c
Compare
Let's wait for the CI but I fixed the error reporting as well and manually tested it on 5.1.1 so it should be good this time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! The trimming removes many version-specific tests.
Signed-off-by: Nathan Rebours <[email protected]>
It seems that in 5.1.0 the output of the toplevel was sometime prefixed with an empty line and that led us to have seperate expect test output reference files for 5.1.0.
This PR slightly modifies the expect test runner to trim the toplevel output, getting rid of said lines on the way.
There is also a small bonus: I'm suggesting a rewriting of one of the deriving test so it relies on a positive output of the toplevel rather than on error reporting from the compiler. I maybe lacking context but it seems to me the two test are equivalent and the updated one won't trigger a failure due to what appears to be a change in the error reporting in OCaml 5.2.
Please let me know what you think!