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

Fix expected error message in libxml2 error spec #8699

Merged

Conversation

straight-shoota
Copy link
Member

Starting from libxml2 2.9.10 the error message for the case we're testing has changed from Premature end of data in tag people line 1 to EndTag: '</' not found.
The change was introduced by this commit in libxml2: https://gitlab.gnome.org/GNOME/libxml2/commit/62150ed2ab19a4dd76c15acc62c7d923d9f3b2cc

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:specs labels Jan 18, 2020
@straight-shoota
Copy link
Member Author

We could probably also just try to trigger a different error to make the spec code less complex. The specific error doesn't seem to matter, the spec just needs to ensure error handling works in general.

Copy link
Member

@bcardiff bcardiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn’t this changing the nature of the case being tested? Unterminated xml vs wrongly structured one.

@straight-shoota
Copy link
Member Author

@bcardiff Yes, but the purpose of this spec is testing error handling in general. It doesn't matter which specific error is used as an example. It just needs to make sure the error messages fits to the error being tested.

@yxhuvud
Copy link
Contributor

yxhuvud commented Jan 19, 2020

@bcardiff: Unterminated XML is not fundamentally different to wrongly structured XML anyhow. Compare with the following error message from the compiler: Error: expecting identifier 'end', not 'EOF'. Is that badly structured or is it an unterminated something? The answer is that it can be both (often at the same time, caused by faulty copy-paste), and it is typically not super easy to see where the error is without invoking the formatter.

@straight-shoota straight-shoota merged commit 7c326b0 into crystal-lang:master Jan 28, 2020
@straight-shoota straight-shoota deleted the fix/xml-spec-error branch January 28, 2020 20:52
@straight-shoota straight-shoota added this to the 0.33.0 milestone Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:specs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants