📄 utf8hash.t
字号:
#!./perlsub BEGIN { if ($] < 5.007) { print "1..0 # Skip: no utf8 hash key support\n"; exit 0; } if ($ENV{PERL_CORE}){ chdir('t') if -d 't'; @INC = ('.', '../lib'); if ($^O eq 'MacOS') { # Look, I'm using this fully-qualified variable more than once! my $arch = $MacPerl::Architecture; push @INC, "::lib:${MacPerl::Architecture}:"; } } else { unshift @INC, 't'; } require Config; import Config; if ($ENV{PERL_CORE}){ if($Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } }}use strict;our $DEBUGME = shift || 0;use Storable qw(store nstore retrieve thaw freeze);{ no warnings; $Storable::DEBUGME = ($DEBUGME > 1);}# Better than no plan, because I was getting out of memory errors, at which# point Test::More tidily prints up 1..79 as if I meant to finish there.use Test::More tests=>144;use bytes ();my %utf8hash;$Storable::canonical = $Storable::canonical; # Shut up a used only once warning.for $Storable::canonical (0, 1) {# first we generate a nasty hash which keys include both utf8# on and off with identical PVsno utf8; # we have a naked 8-bit byte below (in Latin 1, anyway)# In Latin 1 -ese the below ord() should end up 0xc0 (192),# in EBCDIC 0x64 (100). Both should end up being UTF-8/UTF-EBCDIC.my @ords = ( ord("
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -