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

Further improve unicode/character string tests #4

Merged
merged 1 commit into from Apr 29, 2016

Conversation

Projects
None yet
2 participants
@kaoru
Contributor

kaoru commented Apr 28, 2016

Hi there! This is my CPAN PR challenge submission for April 2016 :-)


I noticed that the test string for unicode in 003_json.t was "château",
which as a latin1 valid string risks interacting with The Unicode Bug
from earlier versions of Perl. Using a string which can only be
represented with utf8 ensures that Perl's unicode systme is being tested
on older Perls. My favourite is \x{2764} also known as HEAVY BLACK HEART.

Also added the same unicode tests to the Storable and YAML test cases.
We can't test the in-DB representation match for Storable of course, but
the end to end test is still useful.


With perlbrew I tested this change on a bunch of Perls...

$ perlbrew exec 'prove -lr t 2>&1 | grep ^Result'
perl-5.10.1
==========
Result: PASS

perl-5.12.5
==========
Result: PASS

perl-5.14.4
==========
Result: PASS

perl-5.16.3
==========
Result: PASS

perl-5.18.4
==========
Result: PASS

perl-5.20.2
==========
Result: PASS

perl-5.22.1
==========
Result: PASS
Further improve unicode/character string tests
I noticed that the test string for unicode in 003_json.t was "château",
which as a latin1 valid string risks interacting with The Unicode Bug
from earlier versions of Perl. Using a string which can only be
represented with utf8 ensures that Perl's unicode systme is being tested
on older Perls. My favourite is \x{2764} also known as HEAVY BLACK HEART.

Also added the same unicode tests to the Storable and YAML test cases.
We can't test the in-DB representation match for Storable of course, but
the end to end test is still useful.

@miquelruiz miquelruiz merged commit 19e74e3 into miquelruiz:master Apr 29, 2016

@miquelruiz

This comment has been minimized.

Show comment
Hide comment
@miquelruiz

miquelruiz Apr 29, 2016

Owner

Awesome work :)
Thanks!

Owner

miquelruiz commented Apr 29, 2016

Awesome work :)
Thanks!

@kaoru

This comment has been minimized.

Show comment
Hide comment
@kaoru

kaoru May 2, 2016

Contributor

No problem :-)

Contributor

kaoru commented May 2, 2016

No problem :-)

@kaoru kaoru deleted the kaoru:improve-unicode-character-string-tests branch May 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment