summaryrefslogtreecommitdiff
path: root/ext/XS-APItest
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-03-24 06:52:51 -0600
committerKarl Williamson <khw@cpan.org>2022-03-26 19:31:50 -0600
commit05f622047dbee5058a27b2a9674a3081ffc0292f (patch)
tree47c044ccaa32d95ed0dae41031cbd71c82b0b461 /ext/XS-APItest
parent3fc5cc3eec542ccf9668b6afd3b2919ef5a3fb25 (diff)
downloadperl-05f622047dbee5058a27b2a9674a3081ffc0292f.tar.gz
APItest/t/sv_streq.t: Generalize for EBCDIC
This test fails on EBCDIC systems, because it wants a non-ASCII character, and the one it chose, E9, is ASCII on EBCDIC ('Z'). perlhacktips suggests B6 as a character to use in such tests, and this commit changes to use that.
Diffstat (limited to 'ext/XS-APItest')
-rw-r--r--ext/XS-APItest/t/sv_streq.t14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/XS-APItest/t/sv_streq.t b/ext/XS-APItest/t/sv_streq.t
index dca7309f4b..e2e6063046 100644
--- a/ext/XS-APItest/t/sv_streq.t
+++ b/ext/XS-APItest/t/sv_streq.t
@@ -8,19 +8,19 @@ ok sv_streq($abc, "abc"), '$abc eq "abc"';
ok !sv_streq($abc, "def"), '$abc ne "def"';
{
- # U+00E9 = LATIN SMALL LETTER E WITH ACUTE
- # UTF-8: \xc3 \xa9
- my $cafe_LATIN1 = "caf\xe9";
- utf8::upgrade(my $cafe_UNICODE = "caf\x{00e9}");
- utf8::encode (my $cafe_UTF8 = "caf\x{00e9}");
+ # U+00B6 = PARAGRAPH SEPARATOR
+ # UTF-8 on ASCII boxes: \xc2 \xb6
+ my $psep_LATIN1 = "psep\xb6";
+ utf8::upgrade(my $psep_UNICODE = "psep\x{00b6}");
+ utf8::encode (my $psep_UTF8 = "psep\x{00b6}");
# Latin-1 and Unicode strings should compare equal despite containing
# different underlying bytes in the SvPV
- ok sv_streq($cafe_LATIN1, $cafe_UNICODE), 'sv_streq handles UTF8 strings';
+ ok sv_streq($psep_LATIN1, $psep_UNICODE), 'sv_streq handles UTF8 strings';
# UTF-8 and Unicode strings should not compare equal, even though they
# contain the same bytes in the SvPV
- ok !sv_streq($cafe_UTF8, $cafe_UNICODE), 'sv_streq takes UTF8ness into account';
+ ok !sv_streq($psep_UTF8, $psep_UNICODE), 'sv_streq takes UTF8ness into account';
}
# GMAGIC