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

Corrected locale dependent unit test t/idn.t #103

Merged
merged 1 commit into from
Apr 7, 2020

Conversation

matsduf
Copy link
Contributor

@matsduf matsduf commented Apr 6, 2020

Fixes issue #102

@matsduf matsduf added T-Bug Type: Bug in software or error in test case description A-BuildSystem labels Apr 6, 2020
@matsduf matsduf added this to the v2019.2 milestone Apr 6, 2020
@matsduf matsduf requested review from mattias-p and sandoche2k April 6, 2020 14:34
@matsduf matsduf linked an issue Apr 6, 2020 that may be closed by this pull request
@mattias-p
Copy link
Member

As you describe in the bug report the problem is that the unit test is locale dependent. This fix does not change that. Have you considered forcing C locale instead of (or possibly in addition to) dropping the case sensitivity?

@matsduf
Copy link
Contributor Author

matsduf commented Apr 7, 2020

As you describe in the bug report the problem is that the unit test is locale dependent. This fix does not change that.

Yes and no. In this case the phrase "punycode" will probably be kept in a translated error message, but a solution not based on the error message is better. This will at least work as a work-around that does not make things worse. Maybe there is an error code that could be captured instead.

Have you considered forcing C locale instead of (or possibly in addition to) dropping the case sensitivity?

Do you mean forcing C locale by resetting the locale in the test code? No, I decided to take the short solution (work-around), but I could create an issue that it should be fixed. Maybe you see that the solution is quick and easy, or else have the work-around now, and solution later.

@mattias-p
Copy link
Member

Maybe there is an error code that could be captured instead.

That would be really nice, but I've come to not expect such things in Perl.

No, I decided to take the short solution (work-around), but I could create an issue that it should be fixed.

👍

@matsduf
Copy link
Contributor Author

matsduf commented Apr 7, 2020

This is a work-around to fix #102. Issue #104 has been created for a solution.

@matsduf matsduf merged commit b19c79c into zonemaster:develop Apr 7, 2020
@matsduf matsduf deleted the correct-idn.t branch April 7, 2020 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Bug Type: Bug in software or error in test case description
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit test t/idn.t is locale dependent
2 participants