diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2010-09-24 14:49:06 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2010-09-24 14:49:06 +0000 |
commit | 34f15c28ab5cb52b70b2c53501e8ca0b3ff2f53d (patch) | |
tree | 844a92f07d5d2f5746f96ceedf795608950e9508 /gnu/usr.bin | |
parent | 58526a28d9a53fa64fd203ff74bbe944f93139f7 (diff) |
Perl 5.12.2 from CPAN
Diffstat (limited to 'gnu/usr.bin')
34 files changed, 313 insertions, 476 deletions
diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5006001 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5006001 index b3626c0b55f..ed53af5cc3d 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5006001 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5006001 @@ -4,8 +4,6 @@ apply_attrs_string # U bytes_to_utf8 # U gv_efullname4 # U gv_fullname4 # U -isBLANK # U -isPSXSPC # U is_utf8_string # U save_generic_pvref # U utf16_to_utf8 # E (Perl_utf16_to_utf8) @@ -15,3 +13,5 @@ G_METHOD # added by devel/scanprov NVef # added by devel/scanprov NVff # added by devel/scanprov NVgf # added by devel/scanprov +isBLANK # added by devel/scanprov +isPSXSPC # added by devel/scanprov diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5007002 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5007002 index 393fcf1f6b9..148eef92528 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5007002 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5007002 @@ -49,6 +49,8 @@ PERL_MAGIC_fm # added by devel/scanprov PERL_MAGIC_isa # added by devel/scanprov PERL_MAGIC_isaelem # added by devel/scanprov PERL_MAGIC_nkeys # added by devel/scanprov +PERL_MAGIC_overload # added by devel/scanprov +PERL_MAGIC_overload_elem # added by devel/scanprov PERL_MAGIC_overload_table # added by devel/scanprov PERL_MAGIC_pos # added by devel/scanprov PERL_MAGIC_qr # added by devel/scanprov diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5007003 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5007003 index 9347217b2c7..325f06ad936 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5007003 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5007003 @@ -1,7 +1,4 @@ 5.007003 -OP_DESC # U -OP_NAME # U -PL_peepp # E PerlIO_clearerr # U (PerlIO_clearerr) PerlIO_close # U (PerlIO_close) PerlIO_eof # U (PerlIO_eof) @@ -47,21 +44,22 @@ pv_uni_display # U save_shared_pvref # U savesharedpv # U sortsv # U +sv_copypv # U sv_magicext # U sv_nolocking # U sv_nosharing # U sv_pvn_nomg # U sv_recode_to_utf8 # U sv_uni_display # U -toFOLD_uni # U -toLOWER_uni # A -toTITLE_uni # A -toUPPER_uni # A to_uni_fold # U to_uni_lower # E (Perl_to_uni_lower) to_uni_title # E (Perl_to_uni_title) to_uni_upper # E (Perl_to_uni_upper) to_utf8_case # U +to_utf8_fold # U +to_utf8_lower # E (Perl_to_utf8_lower) +to_utf8_title # E (Perl_to_utf8_title) +to_utf8_upper # E (Perl_to_utf8_upper) unpack_str # U uvchr_to_utf8_flags # U uvuni_to_utf8_flags # U diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5008001 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5008001 index 48a800aaa88..a389fd85da2 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5008001 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5008001 @@ -1,19 +1,15 @@ 5.008001 -CvPADLIST # E -PL_comppad # E SvVOK # U XSRETURN_UV # U doing_taint # U find_runcv # U is_utf8_string_loc # U packlist # U -pad_add_anon # U -pad_new # E -pad_tidy # E save_bool # U savestack_grow_cnt # U seed # U sv_cat_decode # U +sv_compile_2op # E (Perl_sv_compile_2op) sv_setpviv # U sv_setpviv_mg # U unpackstring # U diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009003 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009003 index e8f1065315e..23060550f09 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009003 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009003 @@ -2,7 +2,6 @@ Newx # E Newxc # E Newxz # E -PL_check # E SvMAGIC_set # U SvRV_set # U SvSTASH_set # U @@ -21,6 +20,7 @@ hv_eiter_set # U hv_fetchs # U hv_name_set # U hv_placeholders_get # U +hv_placeholders_p # U hv_placeholders_set # U hv_riter_p # U hv_riter_set # U @@ -31,7 +31,7 @@ newSVhek # U newSVpvs # U newSVpvs_share # U newWHENOP # U -pad_compname_type # U +newWHILEOP # E (Perl_newWHILEOP) savepvs # U sortsv_flags # U sv_catpvs # U diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009004 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009004 index fa236f03669..2f88d2a2ffa 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009004 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009004 @@ -11,7 +11,6 @@ SvREFCNT_inc_simple_void_NN # U SvREFCNT_inc_void # U SvREFCNT_inc_void_NN # U gv_name_set # U -hv_copy_hints_hv # U hv_stores # U my_snprintf # U my_strlcat # U diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009005 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009005 index 8ddae03de6f..68ceff2b010 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009005 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5009005 @@ -1,5 +1,4 @@ 5.009005 -PL_parser # E Perl_signbit # U SvRX # U SvRXOK # U @@ -7,7 +6,6 @@ av_create_and_push # U av_create_and_unshift_one # U get_cvn_flags # U gv_fetchfile_flags # U -lex_start # E (Perl_lex_start) mro_get_linear_isa # U mro_method_changed_in # U my_dirfd # U @@ -20,6 +18,7 @@ ptr_table_new # U ptr_table_split # U ptr_table_store # U re_compile # U +re_intuit_start # E (Perl_re_intuit_start) reg_named_buff_all # U reg_named_buff_exists # U reg_named_buff_fetch # U @@ -31,7 +30,6 @@ savesharedpvn # U scan_vstring # E (Perl_scan_vstring) upg_version # E (Perl_upg_version) PERL_PV_ESCAPE_RE # added by devel/scanprov +PL_parser # added by devel/scanprov SV_COW_SHARED_HASH_KEYS # added by devel/scanprov SVfARG # added by devel/scanprov -memEQs # added by devel/scanprov -memNEs # added by devel/scanprov diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5011000 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5011000 index 1f499d99e07..fe92c15d261 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5011000 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/base/5011000 @@ -1,15 +1,52 @@ 5.011000 -Gv_AMupdate # E (Perl_Gv_AMupdate) -PL_opfreehook # E -SVt_REGEXP # E +HeUTF8 # U +MULTICALL # E +PERL_SYS_TERM # E +POP_MULTICALL # E +PUSH_MULTICALL # E SvOOK_offset # U av_iter_p # U -gv_add_by_type # U -is_ascii_string # U +croak_xs_usage # U +fetch_cop_label # U +gv_fetchmethod_flags # U +hv_assert # U +mPUSHs # U +mXPUSHs # U +mro_get_from_name # U +mro_get_private_data # U +mro_register # U +mro_set_mro # U +mro_set_private_data # U +newSVpvn_flags # U +newSVpvn_utf8 # U +newSVpvs_flags # U +pad_sv # U pregfree2 # U +ref # U (Perl_ref) save_adelete # U -save_aelem_flags # U -save_hdelete # U save_helem_flags # U +save_padsv_and_mortalize # U +save_pushptr # U +stashpv_hvname_match # U +sv_insert_flags # U +sv_magic_portable # U sv_utf8_upgrade_flags_grow # U -get_cvs # added by devel/scanprov +DEFSV_set # added by devel/scanprov +PERL_BCDVERSION # added by devel/scanprov +PERL_MAGIC_glob # added by devel/scanprov +PERL_MAGIC_mutex # added by devel/scanprov +PL_bufend # added by devel/scanprov +PL_bufptr # added by devel/scanprov +PL_copline # added by devel/scanprov +PL_error_count # added by devel/scanprov +PL_expect # added by devel/scanprov +PL_in_my # added by devel/scanprov +PL_in_my_stash # added by devel/scanprov +PL_lex_state # added by devel/scanprov +PL_lex_stuff # added by devel/scanprov +PL_linestr # added by devel/scanprov +PL_tokenbuf # added by devel/scanprov +WARN_ASSERTIONS # added by devel/scanprov +aTHXR # added by devel/scanprov +aTHXR_ # added by devel/scanprov +dTHXR # added by devel/scanprov diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5007003 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5007003 index cc22577c300..2271d2bcd9d 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5007003 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5007003 @@ -1,7 +1,4 @@ 5.007003 -OP_DESC # U -OP_NAME # U -PL_peepp # E PerlIO_clearerr # U (PerlIO_clearerr) PerlIO_close # U (PerlIO_close) PerlIO_eof # U (PerlIO_eof) @@ -44,20 +41,21 @@ pv_uni_display # U save_shared_pvref # U savesharedpv # U sortsv # U +sv_copypv # U sv_magicext # U sv_nolocking # U sv_nosharing # U sv_recode_to_utf8 # U sv_uni_display # U -toFOLD_uni # U -toLOWER_uni # A -toTITLE_uni # A -toUPPER_uni # A to_uni_fold # U to_uni_lower # E (Perl_to_uni_lower) to_uni_title # E (Perl_to_uni_title) to_uni_upper # E (Perl_to_uni_upper) to_utf8_case # U +to_utf8_fold # U +to_utf8_lower # E (Perl_to_utf8_lower) +to_utf8_title # E (Perl_to_utf8_title) +to_utf8_upper # E (Perl_to_utf8_upper) unpack_str # U uvchr_to_utf8_flags # U uvuni_to_utf8_flags # U diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5008001 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5008001 index adb1eb327cb..ddc9d09c432 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5008001 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5008001 @@ -1,18 +1,14 @@ 5.008001 -CvPADLIST # E -PL_comppad # E SvVOK # U doing_taint # U find_runcv # U is_utf8_string_loc # U packlist # U -pad_add_anon # U -pad_new # E -pad_tidy # E save_bool # U savestack_grow_cnt # U seed # U sv_cat_decode # U +sv_compile_2op # E (Perl_sv_compile_2op) sv_setpviv # U sv_setpviv_mg # U unpackstring # U diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009002 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009002 index 5678492aef9..d00dcdac9b9 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009002 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009002 @@ -1,6 +1,7 @@ 5.009002 SvPVbyte_force # U find_rundefsvoffset # U +gv_fetchsv # U op_refcnt_lock # U op_refcnt_unlock # U savesvpv # U diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009003 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009003 index 5b9c10ab551..6a69c9f0437 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009003 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009003 @@ -10,14 +10,16 @@ hv_eiter_p # U hv_eiter_set # U hv_name_set # U hv_placeholders_get # U +hv_placeholders_p # U hv_placeholders_set # U hv_riter_p # U hv_riter_set # U is_utf8_string_loclen # U newGIVENOP # U newSVhek # U +newSVpvs_share # U newWHENOP # U -pad_compname_type # U +newWHILEOP # E (Perl_newWHILEOP) savepvs # U sortsv_flags # U vverify # U diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009004 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009004 index 6295708cd65..0d6b7d50519 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009004 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5009004 @@ -1,7 +1,6 @@ 5.009004 PerlIO_context_layers # U gv_name_set # U -hv_copy_hints_hv # U my_vsnprintf # U newXS_flags # U regclass_swash # E (Perl_regclass_swash) diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5011000 b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5011000 index 805d8b19acd..f58fa284170 100644 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5011000 +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/parts/todo/5011000 @@ -1,14 +1,27 @@ 5.011000 -Gv_AMupdate # E (Perl_Gv_AMupdate) -PL_opfreehook # E -SVt_REGEXP # E +HeUTF8 # U +MULTICALL # E +PERL_SYS_TERM # E +POP_MULTICALL # E +PUSH_MULTICALL # E SvOOK_offset # U av_iter_p # U -gv_add_by_type # U -is_ascii_string # U +croak_xs_usage # U +fetch_cop_label # U +gv_fetchmethod_flags # U +hv_assert # U +mro_get_from_name # U +mro_get_private_data # U +mro_register # U +mro_set_mro # U +mro_set_private_data # U +pad_sv # U pregfree2 # U +ref # U (Perl_ref) save_adelete # U -save_aelem_flags # U -save_hdelete # U save_helem_flags # U +save_padsv_and_mortalize # U +save_pushptr # U +stashpv_hvname_match # U +sv_insert_flags # U sv_utf8_upgrade_flags_grow # U diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/t/SvPV.t b/gnu/usr.bin/perl/cpan/Devel-PPPort/t/SvPV.t index 392a0ccb0e3..63c7d72c43d 100755 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/t/SvPV.t +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/t/SvPV.t @@ -30,9 +30,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (49) { + if (47) { load(); - plan(tests => 49); + plan(tests => 47); } } @@ -76,7 +76,6 @@ ok(&Devel::PPPort::SvPV_nolen_const($mhx), $i++); ok(&Devel::PPPort::SvPV_nomg($mhx), $i++); ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++); ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++); -ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), $i++); $mhx = 42; ok(&Devel::PPPort::SvPV_nolen($mhx), 0); $mhx = 42; ok(&Devel::PPPort::SvPV_const($mhx), 2); @@ -100,10 +99,8 @@ $mhx = 42; ok(&Devel::PPPort::SvPV_nolen_const($mhx), 0); $mhx = 42; ok(&Devel::PPPort::SvPV_nomg($mhx), 2); $mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const($mhx), 2); $mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0); -$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), 0); my $str = ""; -&Devel::PPPort::SvPV_force($str); my($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 81, "x"x80); ok($str, "x"x80); ok($s2, "x"x80); @@ -111,7 +108,6 @@ ok($before < 81); ok($after, 81); $str = "x"x400; -&Devel::PPPort::SvPV_force($str); ($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 41, "x"x40); ok($str, "x"x40); ok($s2, "x"x40); diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/t/gv.t b/gnu/usr.bin/perl/cpan/Devel-PPPort/t/gv.t index 66722f27a03..3bf9ce6cefa 100755 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/t/gv.t +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/t/gv.t @@ -30,9 +30,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (5) { + if (2) { load(); - plan(tests => 5); + plan(tests => 2); } } @@ -50,11 +50,5 @@ package main; ok(Devel::PPPort::GvSVn(), 1); -ok(Devel::PPPort::isGV_with_GP(), 2); - -ok(Devel::PPPort::get_cvn_flags(), 3); - -ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION); - -ok(Devel::PPPort::gv_fetchsv("Devel::PPPort::VERSION"), \*Devel::PPPort::VERSION); +ok(Devel::PPPort::isGV_with_GP(), 2) diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/t/memory.t b/gnu/usr.bin/perl/cpan/Devel-PPPort/t/memory.t index 74ecb991bcf..501b819864e 100755 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/t/memory.t +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/t/memory.t @@ -48,5 +48,5 @@ bootstrap Devel::PPPort; package main; -ok(Devel::PPPort::checkmem(), 6); +ok(Devel::PPPort::checkmem(), 4); diff --git a/gnu/usr.bin/perl/cpan/Devel-PPPort/t/pvs.t b/gnu/usr.bin/perl/cpan/Devel-PPPort/t/pvs.t index ff4d3e05860..7886096615b 100755 --- a/gnu/usr.bin/perl/cpan/Devel-PPPort/t/pvs.t +++ b/gnu/usr.bin/perl/cpan/Devel-PPPort/t/pvs.t @@ -30,9 +30,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (12) { + if (11) { load(); - plan(tests => 12); + plan(tests => 11); } } @@ -52,7 +52,6 @@ my $x = 'foo'; ok(Devel::PPPort::newSVpvs(), "newSVpvs"); ok(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags"); -ok(Devel::PPPort::newSVpvs_share(), 3); Devel::PPPort::sv_catpvs($x); ok($x, "foosv_catpvs"); @@ -66,8 +65,7 @@ ok(scalar keys %h, 2); ok(exists $h{'hv_stores'}); ok($h{'hv_stores'}, 4711); ok(Devel::PPPort::hv_fetchs(\%h), 42); -ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION); -ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::); - -ok(Devel::PPPort::get_cvs(), 3); +ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION); +ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION); +ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::); diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm index f412368317c..74461854442 100644 --- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm +++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm @@ -88,6 +88,8 @@ END sub setup { + setup_mm_test_root(); + chdir 'MM_TEST_ROOT:[t]' if $^O eq 'VMS'; while(my($file, $text) = each %Files) { # Convert to a relative, native file path. @@ -108,7 +110,7 @@ sub setup { return 1; } -sub teardown { +sub teardown { foreach my $file (keys %Files) { my $dir = dirname($file); if( -e $dir ) { diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm index 59ac1517a6e..c6573a1aadd 100644 --- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm +++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm @@ -48,7 +48,7 @@ sub setup_recurs { return 1; } -sub teardown_recurs { +sub teardown_recurs { foreach my $file (keys %Files) { my $dir = dirname($file); if( -e $dir ) { diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm index 8694321358c..ad1be2f6d1d 100644 --- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm +++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm @@ -38,6 +38,8 @@ END ); sub setup_recurs { + setup_mm_test_root(); + chdir 'MM_TEST_ROOT:[t]' if $^O eq 'VMS'; while(my($file, $text) = each %Files) { # Convert to a relative, native file path. @@ -58,7 +60,7 @@ sub setup_recurs { return 1; } -sub teardown_recurs { +sub teardown_recurs { foreach my $file (keys %Files) { my $dir = dirname($file); if( -e $dir ) { diff --git a/gnu/usr.bin/perl/cpan/Locale-Codes/t/language.t b/gnu/usr.bin/perl/cpan/Locale-Codes/t/language.t index 82051b956a4..88edcee8163 100755 --- a/gnu/usr.bin/perl/cpan/Locale-Codes/t/language.t +++ b/gnu/usr.bin/perl/cpan/Locale-Codes/t/language.t @@ -1,99 +1,110 @@ -#!/usr/bin/perl -w - -require 5.002; - -$runtests=shift(@ARGV); -if ( -f "t/testfunc.pl" ) { - require "t/testfunc.pl"; - $dir="./lib"; - $tdir="t"; -} elsif ( -f "testfunc.pl" ) { - require "testfunc.pl"; - $dir="../lib"; - $tdir="."; -} else { - die "ERROR: cannot find testfunc.pl\n"; +#!./perl +# +# language.t - tests for Locale::Language +# + +BEGIN { + chdir 't' if -d 't'; + #@INC = '../lib'; } -unshift(@INC,$dir); -use Locale::Codes::Language; - -%type = ( "LOCALE_LANG_ALPHA_2" => LOCALE_LANG_ALPHA_2, - "LOCALE_LANG_ALPHA_3" => LOCALE_LANG_ALPHA_3, - "LOCALE_LANG_TERM" => LOCALE_LANG_TERM, - ); - -sub test { - my(@test) = @_; - - if ($test[0] eq "rename_language") { - shift(@test); - $test[2] = $type{$test[2]} - if (@test == 3 && $test[2] && exists $type{$test[2]}); - return Locale::Codes::Language::rename_language(@test,"nowarn"); - - } elsif ($test[0] eq "add_language") { - shift(@test); - $test[2] = $type{$test[2]} - if (@test == 3 && $test[2] && exists $type{$test[2]}); - return Locale::Codes::Language::add_language(@test,"nowarn"); - - } elsif ($test[0] eq "delete_language") { - shift(@test); - $test[1] = $type{$test[1]} - if (@test == 2 && $test[1] && exists $type{$test[1]}); - return Locale::Codes::Language::delete_language(@test,"nowarn"); - - } elsif ($test[0] eq "add_language_alias") { - shift(@test); - return Locale::Codes::Language::add_language_alias(@test,"nowarn"); - - } elsif ($test[0] eq "delete_language_alias") { - shift(@test); - return Locale::Codes::Language::delete_language_alias(@test,"nowarn"); - - } elsif ($test[0] eq "language2code") { - shift(@test); - $test[1] = $type{$test[1]} - if (@test == 2 && $test[1] && exists $type{$test[1]}); - return language2code(@test); - - } else { - $test[1] = $type{$test[1]} - if (@test == 2 && $test[1] && exists $type{$test[1]}); - return code2language(@test); - } +use Locale::Language; + +no utf8; # we contain Latin-1 + +#----------------------------------------------------------------------- +# This is an array of tests. Each test is eval'd as an expression. +# If it evaluates to FALSE, then "not ok N" is printed for the test, +# otherwise "ok N". +#----------------------------------------------------------------------- +@TESTS = +( + #================================================ + # TESTS FOR code2language + #================================================ + + #---- selection of examples which should all result in undef ----------- + '!defined code2language()', # no argument => undef returned + '!defined code2language(undef)', # undef arg => undef returned + '!defined code2language("zz")', # illegal code => undef + '!defined code2language("jp")', # ja for lang, jp for country + + #---- test recent changes ---------------------------------------------- + 'code2language("ae") eq "Avestan"', + 'code2language("bs") eq "Bosnian"', + 'code2language("ch") eq "Chamorro"', + 'code2language("ce") eq "Chechen"', + 'code2language("cu") eq "Church Slavic"', + 'code2language("cv") eq "Chuvash"', + 'code2language("hz") eq "Herero"', + 'code2language("ho") eq "Hiri Motu"', + 'code2language("ki") eq "Kikuyu"', + 'code2language("kj") eq "Kuanyama"', + 'code2language("kv") eq "Komi"', + 'code2language("mh") eq "Marshall"', + 'code2language("nv") eq "Navajo"', + 'code2language("nr") eq "Ndebele, South"', + 'code2language("nd") eq "Ndebele, North"', + 'code2language("ng") eq "Ndonga"', + 'code2language("nn") eq "Norwegian Nynorsk"', + 'code2language("nb") eq "Norwegian Bokmal"', + 'code2language("ny") eq "Chichewa; Nyanja"', + 'code2language("oc") eq "Occitan (post 1500)"', + 'code2language("os") eq "Ossetian; Ossetic"', + 'code2language("pi") eq "Pali"', + '!defined code2language("sh")', # Serbo-Croatian withdrawn + 'code2language("se") eq "Sami"', + 'code2language("sc") eq "Sardinian"', + 'code2language("kw") eq "Cornish"', + 'code2language("gv") eq "Manx"', + 'code2language("lb") eq "Letzeburgesch"', + 'code2language("he") eq "Hebrew"', + '!defined code2language("iw")', # Hebrew withdrawn + 'code2language("id") eq "Indonesian"', + '!defined code2language("in")', # Indonesian withdrawn + 'code2language("iu") eq "Inuktitut"', + 'code2language("ug") eq "Uighur"', + '!defined code2language("ji")', # Yiddish withdrawn + 'code2language("yi") eq "Yiddish"', + 'code2language("za") eq "Zhuang"', + + #---- some successful examples ----------------------------------------- + 'code2language("DA") eq "Danish"', + 'code2language("eo") eq "Esperanto"', + 'code2language("fi") eq "Finnish"', + 'code2language("en") eq "English"', + 'code2language("aa") eq "Afar"', # first in DATA segment + 'code2language("zu") eq "Zulu"', # last in DATA segment + + #================================================ + # TESTS FOR language2code + #================================================ + + #---- selection of examples which should all result in undef ----------- + '!defined language2code()', # no argument => undef returned + '!defined language2code(undef)', # undef arg => undef returned + '!defined language2code("Banana")', # illegal lang name => undef + + #---- some successful examples ----------------------------------------- + 'language2code("Japanese") eq "ja"', + 'language2code("japanese") eq "ja"', + 'language2code("japanese") ne "jp"', + 'language2code("French") eq "fr"', + 'language2code("Greek") eq "el"', + 'language2code("english") eq "en"', + 'language2code("ESTONIAN") eq "et"', + 'language2code("Afar") eq "aa"', # first in DATA segment + 'language2code("Zulu") eq "zu"', # last in DATA segment +); + +print "1..", int(@TESTS), "\n"; + +$testid = 1; +foreach $test (@TESTS) +{ + eval "print (($test) ? \"ok $testid\\n\" : \"not ok $testid\\n\" )"; + print "not ok $testid\n" if $@; + ++$testid; } -$tests = " - -zu ~ Zulu - -rename_language zu NewName LOCALE_LANG_FOO ~ 0 - -rename_language zu English LOCALE_LANG_ALPHA_2 ~ 0 - -rename_language zu NewName LOCALE_LANG_ALPHA_3 ~ 0 - -zu ~ Zulu - -rename_language zu NewName LOCALE_LANG_ALPHA_2 ~ 1 - -zu ~ NewName - -"; - -print "language (semi-private)...\n"; -test_Func(\&test,$tests,$runtests); - -1; -# Local Variables: -# mode: cperl -# indent-tabs-mode: nil -# cperl-indent-level: 3 -# cperl-continued-statement-offset: 2 -# cperl-continued-brace-offset: 0 -# cperl-brace-offset: 0 -# cperl-brace-imaginary-offset: 0 -# cperl-label-offset: -2 -# End: +exit 0; diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/t/cmp_ok.t b/gnu/usr.bin/perl/cpan/Test-Simple/t/cmp_ok.t index c9b9f1bf65f..de1a7e634d9 100755 --- a/gnu/usr.bin/perl/cpan/Test-Simple/t/cmp_ok.t +++ b/gnu/usr.bin/perl/cpan/Test-Simple/t/cmp_ok.t @@ -1,9 +1,16 @@ #!/usr/bin/perl -w -use strict; -use warnings; +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't'; + @INC = ('../lib', 'lib', '../lib/Test/Simple/t/lib'); + } + else { + unshift @INC, 't/lib'; + } +} -use lib 't/lib'; +use strict; require Test::Simple::Catch; my($out, $err) = Test::Simple::Catch::caught(); @@ -14,33 +21,18 @@ my $TB = Test::Builder->create; $TB->level(0); sub try_cmp_ok { - my($left, $cmp, $right, $error) = @_; + my($left, $cmp, $right) = @_; my %expect; - if( $error ) { - $expect{ok} = 0; - $expect{error} = $error; - } - else { - $expect{ok} = eval "\$left $cmp \$right"; - $expect{error} = $@; - $expect{error} =~ s/ at .*\n?//; - } + $expect{ok} = eval "\$left $cmp \$right"; + $expect{error} = $@; + $expect{error} =~ s/ at .*\n?//; local $Test::Builder::Level = $Test::Builder::Level + 1; - - my $ok; - eval { $ok = cmp_ok($left, $cmp, $right, "cmp_ok"); }; - + my $ok = cmp_ok($left, $cmp, $right, "cmp_ok"); $TB->is_num(!!$ok, !!$expect{ok}, " right return"); my $diag = $err->read; - - if ($@) { - $diag = $@; - $diag =~ s/ at .*\n?//; - } - if( !$ok and $expect{error} ) { $diag =~ s/^# //mg; $TB->like( $diag, qr/\Q$expect{error}\E/, " expected error" ); @@ -73,9 +65,6 @@ my @Tests = ( [$cmp, 'eq', "foo"], [$ify, 'eq', "bar"], [$ify, "==", 23], - - [1, "=", 0, "= is not a valid comparison operator in cmp_ok()"], - [1, "+=", 0, "+= is not a valid comparison operator in cmp_ok()"], ); plan tests => scalar @Tests; diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/t/fail-like.t b/gnu/usr.bin/perl/cpan/Test-Simple/t/fail-like.t index 03830949133..0ea5fab3dab 100755 --- a/gnu/usr.bin/perl/cpan/Test-Simple/t/fail-like.t +++ b/gnu/usr.bin/perl/cpan/Test-Simple/t/fail-like.t @@ -44,28 +44,25 @@ Test::More->import(tests => 1); not ok 1 - is foo like that OUT - # Accept both old and new-style stringification - my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '\\^' : '-xism'; - my $err_re = <<ERR; # Failed test 'is foo like that' # at .* line 1\. # 'foo' -# doesn't match '\\(\\?$modifiers:that\\)' +# doesn't match '\\(\\?-xism:that\\)' ERR $TB->like($err->read, qr/^$err_re$/, 'failing errors'); } { - # line 62 + # line 59 like("foo", "not a regex"); $TB->is_eq($out->read, <<OUT); not ok 2 OUT $TB->is_eq($err->read, <<OUT); -# Failed test at $0 line 62. +# Failed test at $0 line 59. # 'not a regex' doesn't look much like a regex to me. OUT diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/t/utf8.t b/gnu/usr.bin/perl/cpan/Test-Simple/t/utf8.t index f68b2a7680e..c7e93c3ac2d 100755 --- a/gnu/usr.bin/perl/cpan/Test-Simple/t/utf8.t +++ b/gnu/usr.bin/perl/cpan/Test-Simple/t/utf8.t @@ -10,14 +10,15 @@ BEGIN { use strict; use warnings; +use Test::More skip_all => 'Not yet implemented'; + my $have_perlio; BEGIN { # All together so Test::More sees the open discipline $have_perlio = eval q[ - require PerlIO; - binmode *STDOUT, ":encoding(utf8)"; - binmode *STDERR, ":encoding(utf8)"; - require Test::More; + use PerlIO; + use open ':std', ':locale'; + use Test::More; 1; ]; } @@ -52,9 +53,10 @@ SKIP: { } } +SKIP: { + skip( "Can't test in general because their locale is unknown", 2 ) + unless $ENV{AUTHOR_TESTING}; -# Test utf8 is ok. -{ my $uni = "\x{11e}"; my @warnings; diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/fcdc.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/fcdc.t index d2ef28b9e90..1cc0db181ce 100755 --- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/fcdc.t +++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/fcdc.t @@ -1,11 +1,8 @@ BEGIN { - unless ('A' eq pack('U', 0x41)) { - print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n"; - exit 0; - } - unless (0x41 == unpack('U', 'A')) { - print "1..0 # Unicode::Normalize cannot get a Unicode code point\n"; + unless ("A" eq pack('U', 0x41)) { + print "1..0 # Unicode::Normalize " . + "cannot stringify a Unicode code point\n"; exit 0; } } @@ -19,22 +16,12 @@ BEGIN { ######################### +use Test; use strict; use warnings; -BEGIN { $| = 1; print "1..70\n"; } -my $count = 0; -sub ok ($;$) { - my $p = my $r = shift; - if (@_) { - my $x = shift; - $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x; - } - print $p ? "ok" : "not ok", ' ', ++$count, "\n"; -} - +BEGIN { plan tests => 70 }; use Unicode::Normalize qw(:all); - -ok(1); +ok(1); # If we made it this far, we're ok. sub _pack_U { Unicode::Normalize::pack_U(@_) } sub hexU { _pack_U map hex, split ' ', shift } @@ -52,8 +39,6 @@ ok(normalize('FCC', ""), ""); ok(normalize('FCC', "A"), "A"); ok(normalize('FCD', "A"), "A"); -# 9 - # if checkFCD is YES, the return value from FCD should be same as the original ok(FCD(hexU("00C5")), hexU("00C5")); # A with ring above ok(FCD(hexU("0041 030A")), hexU("0041 030A")); # A+ring @@ -67,8 +52,6 @@ ok(normalize('FCD', hexU("0041 0327 030A")), hexU("0041 0327 030A")); ok(normalize('FCD', hexU("AC01 1100 1161")), hexU("AC01 1100 1161")); ok(normalize('FCD', hexU("212B F900")), hexU("212B F900")); -# 19 - # if checkFCD is MAYBE or NO, FCD returns NFD (this behavior isn't documented) ok(FCD(hexU("00C5 0327")), hexU("0041 0327 030A")); ok(FCD(hexU("0041 030A 0327")), hexU("0041 0327 030A")); @@ -80,8 +63,6 @@ ok(normalize('FCD', hexU("0041 030A 0327")), hexU("0041 0327 030A")); ok(normalize('FCD', hexU("00C5 0327")), NFD(hexU("00C5 0327"))); ok(normalize('FCD', hexU("0041 030A 0327")), NFD(hexU("0041 030A 0327"))); -# 27 - ok(answer(checkFCD('')), 'YES'); ok(answer(checkFCD('A')), 'YES'); ok(answer(checkFCD("\x{030A}")), 'YES'); # 030A;COMBINING RING ABOVE @@ -102,8 +83,6 @@ ok(answer(checkFCC(hexU("1EA7 05AE 0315 0062"))), "NO"); ok(answer(check('FCD', hexU("1EA7 05AE 0315 0062"))), "NO"); ok(answer(check('FCC', hexU("1EA7 05AE 0315 0062"))), "NO"); -# 45 - ok(FCC(hexU("00C5 0327")), hexU("0041 0327 030A")); ok(FCC(hexU("0045 0304 0300")), "\x{1E14}"); ok(FCC("\x{1100}\x{1161}\x{1100}\x{1173}\x{11AF}"), "\x{AC00}\x{AE00}"); @@ -118,8 +97,6 @@ ok(FCC("\x{1100}\x{1161}\x{0300}"), "\x{AC00}\x{0300}"); ok(FCC("\x{0B47}\x{300}\x{0B3E}\x{327}"), "\x{0B47}\x{300}\x{0B3E}\x{327}"); ok(FCC("\x{1100}\x{300}\x{1161}\x{327}"), "\x{1100}\x{300}\x{1161}\x{327}"); -# 57 - ok(answer(checkFCC('')), 'YES'); ok(answer(checkFCC('A')), 'YES'); ok(answer(checkFCC("\x{030A}")), 'MAYBE'); # 030A;COMBINING RING ABOVE @@ -134,5 +111,3 @@ ok(answer(checkFCC("\x{212B}\x{F900}")), 'NO'); # compat ok(answer(checkFCC("\x{212B}\x{0327}")), 'NO'); # compat ok(answer(checkFCC("\x{0327}\x{212B}")), 'NO'); # compat -# 70 - diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/form.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/form.t index 6bbfb082cab..27cd177596f 100755 --- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/form.t +++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/form.t @@ -1,11 +1,8 @@ BEGIN { - unless ('A' eq pack('U', 0x41)) { - print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n"; - exit 0; - } - unless (0x41 == unpack('U', 'A')) { - print "1..0 # Unicode::Normalize cannot get a Unicode code point\n"; + unless ("A" eq pack('U', 0x41)) { + print "1..0 # Unicode::Normalize " . + "cannot stringify a Unicode code point\n"; exit 0; } } @@ -19,22 +16,12 @@ BEGIN { ######################### +use Test; use strict; use warnings; -BEGIN { $| = 1; print "1..37\n"; } -my $count = 0; -sub ok ($;$) { - my $p = my $r = shift; - if (@_) { - my $x = shift; - $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x; - } - print $p ? "ok" : "not ok", ' ', ++$count, "\n"; -} - +BEGIN { plan tests => 37 }; use Unicode::Normalize qw(:all); - -ok(1); +ok(1); # If we made it this far, we're ok. sub answer { defined $_[0] ? $_[0] ? "YES" : "NO" : "MAYBE" } diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/norm.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/norm.t index d3cec3aea17..5d93747965a 100755 --- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/norm.t +++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/norm.t @@ -1,11 +1,8 @@ BEGIN { - unless ('A' eq pack('U', 0x41)) { - print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n"; - exit 0; - } - unless (0x41 == unpack('U', 'A')) { - print "1..0 # Unicode::Normalize cannot get a Unicode code point\n"; + unless ("A" eq pack('U', 0x41)) { + print "1..0 # Unicode::Normalize " . + "cannot stringify a Unicode code point\n"; exit 0; } } @@ -19,22 +16,12 @@ BEGIN { ######################### +use Test; use strict; use warnings; -BEGIN { $| = 1; print "1..64\n"; } -my $count = 0; -sub ok ($;$) { - my $p = my $r = shift; - if (@_) { - my $x = shift; - $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x; - } - print $p ? "ok" : "not ok", ' ', ++$count, "\n"; -} - +BEGIN { plan tests => 64 }; use Unicode::Normalize qw(normalize); - -ok(1); +ok(1); # If we made it this far, we're ok. sub _pack_U { Unicode::Normalize::pack_U(@_) } sub _unpack_U { Unicode::Normalize::unpack_U(@_) } @@ -61,8 +48,6 @@ ok(normalize('NFC', "A"), "A"); ok(normalize('NFKD',"A"), "A"); ok(normalize('NFKC',"A"), "A"); -# 17 - # don't modify the source my $sNFD = "\x{FA19}"; ok(normalize('NFD', $sNFD), "\x{795E}"); @@ -80,8 +65,6 @@ my $sNFKC = "\x{FA26}"; ok(normalize('NFKC', $sNFKC), "\x{90FD}"); ok($sNFKC, "\x{FA26}"); -# 25 - sub hexNFC { join " ", map sprintf("%04X", $_), _unpack_U normalize 'C', _pack_U map hex, split ' ', shift; @@ -117,14 +100,14 @@ ok(hexNFC("AC00 11A9"), "AC02"); ok(hexNFC("AC00 11C2"), "AC1B"); ok(hexNFC("AC00 11C3"), "AC00 11C3"); -# 47 - # Test Cases from Public Review Issue #29: Normalization Issue # cf. http://www.unicode.org/review/pr-29.html ok(hexNFC("0B47 0300 0B3E"), "0B47 0300 0B3E"); ok(hexNFC("1100 0300 1161"), "1100 0300 1161"); + ok(hexNFC("0B47 0B3E 0300"), "0B4B 0300"); ok(hexNFC("1100 1161 0300"), "AC00 0300"); + ok(hexNFC("0B47 0300 0B3E 0327"), "0B47 0300 0B3E 0327"); ok(hexNFC("1100 0300 1161 0327"), "1100 0300 1161 0327"); @@ -140,6 +123,3 @@ ok(hexNFC("0315 0061 0300"), "0315 00E0"); ok(hexNFC("0000 0327 0061 0300"), "0000 0327 00E0"); ok(hexNFC("0000 0301 0061 0300"), "0000 0301 00E0"); ok(hexNFC("0000 0315 0061 0300"), "0000 0315 00E0"); - -# 64 - diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/null.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/null.t index 9a0008708ed..6067da4775c 100755 --- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/null.t +++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/null.t @@ -1,11 +1,8 @@ BEGIN { - unless ('A' eq pack('U', 0x41)) { - print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n"; - exit 0; - } - unless (0x41 == unpack('U', 'A')) { - print "1..0 # Unicode::Normalize cannot get a Unicode code point\n"; + unless ("A" eq pack('U', 0x41)) { + print "1..0 # Unicode::Normalize " . + "cannot stringify a Unicode code point\n"; exit 0; } } diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/proto.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/proto.t index 38c69857599..3c4298d849a 100755 --- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/proto.t +++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/proto.t @@ -1,11 +1,8 @@ BEGIN { - unless ('A' eq pack('U', 0x41)) { - print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n"; - exit 0; - } - unless (0x41 == unpack('U', 'A')) { - print "1..0 # Unicode::Normalize cannot get a Unicode code point\n"; + unless ("A" eq pack('U', 0x41)) { + print "1..0 # Unicode::Normalize " . + "cannot stringify a Unicode code point\n"; exit 0; } } @@ -19,22 +16,12 @@ BEGIN { ######################### +use Test; use strict; use warnings; -BEGIN { $| = 1; print "1..48\n"; } -my $count = 0; -sub ok ($;$) { - my $p = my $r = shift; - if (@_) { - my $x = shift; - $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x; - } - print $p ? "ok" : "not ok", ' ', ++$count, "\n"; -} - +BEGIN { plan tests => 42 }; use Unicode::Normalize qw(:all); - -ok(1); +ok(1); # If we made it this far, we're ok. ######################### @@ -48,8 +35,6 @@ ok(FCD "\x{30A}\x{327}" eq "\x{327}\x{30A}"); ok(FCC "\x{30A}\x{327}" eq "\x{327}\x{30A}"); ok(reorder "\x{30A}\x{327}" eq "\x{327}\x{30A}"); -# 9 - ok(prototype \&normalize,'$$'); ok(prototype \&NFD, '$'); ok(prototype \&NFC, '$'); @@ -71,8 +56,6 @@ ok(prototype \&reorder, '$'); ok(prototype \&compose, '$'); ok(prototype \&composeContiguous, '$'); -# 27 - ok(prototype \&getCanon, '$'); ok(prototype \&getCompat, '$'); ok(prototype \&getComposite, '$$'); @@ -82,18 +65,11 @@ ok(prototype \&isSingleton, '$'); ok(prototype \&isNonStDecomp, '$'); ok(prototype \&isComp2nd, '$'); ok(prototype \&isComp_Ex, '$'); + ok(prototype \&isNFD_NO, '$'); ok(prototype \&isNFC_NO, '$'); ok(prototype \&isNFC_MAYBE, '$'); ok(prototype \&isNFKD_NO, '$'); ok(prototype \&isNFKC_NO, '$'); ok(prototype \&isNFKC_MAYBE, '$'); -ok(prototype \&splitOnLastStarter, undef); -ok(prototype \&normalize_partial, '$$'); -ok(prototype \&NFD_partial, '$'); -ok(prototype \&NFC_partial, '$'); -ok(prototype \&NFKD_partial, '$'); -ok(prototype \&NFKC_partial, '$'); - -# 48 diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/split.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/split.t index a92957c2081..6bf7ff66b1f 100755 --- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/split.t +++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/split.t @@ -1,11 +1,8 @@ BEGIN { - unless ('A' eq pack('U', 0x41)) { - print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n"; - exit 0; - } - unless (0x41 == unpack('U', 'A')) { - print "1..0 # Unicode::Normalize cannot get a Unicode code point\n"; + unless ("A" eq pack('U', 0x41)) { + print "1..0 # Unicode::Normalize " . + "cannot stringify a Unicode code point\n"; exit 0; } } @@ -27,22 +24,12 @@ BEGIN { ######################### +use Test; use strict; use warnings; -BEGIN { $| = 1; print "1..34\n"; } -my $count = 0; -sub ok ($;$) { - my $p = my $r = shift; - if (@_) { - my $x = shift; - $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x; - } - print $p ? "ok" : "not ok", ' ', ++$count, "\n"; -} - +BEGIN { plan tests => 14 }; use Unicode::Normalize qw(:all); - -ok(1); +ok(1); # If we made it this far, we're ok. sub _pack_U { Unicode::Normalize::pack_U(@_) } sub _unpack_U { Unicode::Normalize::unpack_U(@_) } @@ -53,6 +40,14 @@ our $proc; # before the last starter our $unproc; # the last starter and after # If string has no starter, entire string is set to $unproc. +# When you have $normalized string and $unnormalized string following, +# a simple concatenation +# C<$concat = $normalized . normalize($form, $unnormalized)> +# is wrong. Instead of it, like this: +# +# ($processed, $unprocessed) = splitOnLastStarter($normalized); +# $concat = $processed . normalize($form, $unprocessed.$unnormalized); + ($proc, $unproc) = splitOnLastStarter(""); ok($proc, ""); ok($unproc, ""); @@ -84,64 +79,3 @@ ok(NFC($ka_grave.$dakuten) eq $ga_grave); ok(NFC($ka_grave).NFC($dakuten) ne $ga_grave); ok($concat eq $ga_grave); -# 14 - -sub arraynorm { - my $form = shift; - my @string = @_; - my $result = ""; - my $unproc = ""; - foreach my $str (@string) { - $unproc .= $str; - my $n = normalize($form, $unproc); - my($p, $u) = splitOnLastStarter($n); - $result .= $p; - $unproc = $u; - } - $result .= $unproc; - return $result; -} - -my $strD = "\x{3C9}\x{301}\x{1100}\x{1161}\x{11A8}\x{1100}\x{1161}\x{11AA}"; -my $strC = "\x{3CE}\x{AC01}\x{AC03}"; -my @str1 = (substr($strD,0,3), substr($strD,3,4), substr($strD,7)); -my @str2 = (substr($strD,0,1), substr($strD,1,3), substr($strD,4)); -ok($strC eq NFC($strD)); -ok($strD eq join('', @str1)); -ok($strC eq arraynorm('NFC', @str1)); -ok($strD eq join('', @str2)); -ok($strC eq arraynorm('NFC', @str2)); - -my @strX = ("\x{300}\x{AC00}", "\x{11A8}"); -my $strX = "\x{300}\x{AC01}"; -ok($strX eq NFC(join('', @strX))); -ok($strX eq arraynorm('NFC', @strX)); -ok($strX eq NFKC(join('', @strX))); -ok($strX eq arraynorm('NFKC', @strX)); - -my @strY = ("\x{304B}\x{0308}", "\x{0323}\x{3099}"); -my $strY = ("\x{304C}\x{0323}\x{0308}"); -ok($strY eq NFC(join('', @strY))); -ok($strY eq arraynorm('NFC', @strY)); -ok($strY eq NFKC(join('', @strY))); -ok($strY eq arraynorm('NFKC', @strY)); - -my @strZ = ("\x{304B}\x{0308}", "\x{0323}", "\x{3099}"); -my $strZ = ("\x{304B}\x{3099}\x{0323}\x{0308}"); -ok($strZ eq NFD(join('', @strZ))); -ok($strZ eq arraynorm('NFD', @strZ)); -ok($strZ eq NFKD(join('', @strZ))); -ok($strZ eq arraynorm('NFKD', @strZ)); - -# 31 - -# don't modify the source - -my $source = "ABC"; -($proc, $unproc) = splitOnLastStarter($source); -ok($proc, "AB"); -ok($unproc, "C"); -ok($source, "ABC"); - -# 34 - diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/test.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/test.t index cb4b6ea6375..e48e16f1b9b 100755 --- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/test.t +++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/test.t @@ -1,11 +1,8 @@ BEGIN { - unless ('A' eq pack('U', 0x41)) { - print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n"; - exit 0; - } - unless (0x41 == unpack('U', 'A')) { - print "1..0 # Unicode::Normalize cannot get a Unicode code point\n"; + unless ("A" eq pack('U', 0x41)) { + print "1..0 # Unicode::Normalize " . + "cannot stringify a Unicode code point\n"; exit 0; } } @@ -19,22 +16,12 @@ BEGIN { ######################### +use Test; use strict; use warnings; -BEGIN { $| = 1; print "1..72\n"; } -my $count = 0; -sub ok ($;$) { - my $p = my $r = shift; - if (@_) { - my $x = shift; - $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x; - } - print $p ? "ok" : "not ok", ' ', ++$count, "\n"; -} - +BEGIN { plan tests => 58 }; use Unicode::Normalize; - -ok(1); +ok(1); # If we made it this far, we're ok. sub _pack_U { Unicode::Normalize::pack_U(@_) } sub _unpack_U { Unicode::Normalize::unpack_U(@_) } @@ -51,8 +38,6 @@ ok(NFC("A"), "A"); ok(NFKD("A"), "A"); ok(NFKC("A"), "A"); -# 9 - # don't modify the source my $sNFD = "\x{FA19}"; ok(NFD($sNFD), "\x{795E}"); @@ -70,7 +55,6 @@ my $sNFKC = "\x{FA26}"; ok(NFKC($sNFKC), "\x{90FD}"); ok($sNFKC, "\x{FA26}"); -# 17 sub hexNFC { join " ", map sprintf("%04X", $_), @@ -107,8 +91,6 @@ ok(hexNFC("AC00 11A9"), "AC02"); ok(hexNFC("AC00 11C2"), "AC1B"); ok(hexNFC("AC00 11C3"), "AC00 11C3"); -# 39 - # Test Cases from Public Review Issue #29: Normalization Issue # cf. http://www.unicode.org/review/pr-29.html ok(hexNFC("0B47 0300 0B3E"), "0B47 0300 0B3E"); @@ -131,38 +113,13 @@ ok(hexNFC("0000 0327 0061 0300"), "0000 0327 00E0"); ok(hexNFC("0000 0301 0061 0300"), "0000 0301 00E0"); ok(hexNFC("0000 0315 0061 0300"), "0000 0315 00E0"); -# 56 - -# NFC() and NFKC() should be unary. +# NFC() should be unary. my $str11 = _pack_U(0x41, 0x0302, 0x0301, 0x62); my $str12 = _pack_U(0x1EA4, 0x62); ok(NFC $str11 eq $str12); -ok(NFKC $str11 eq $str12); -# NFD() and NFKD() should be unary. +# NFD() should be unary. my $str21 = _pack_U(0xE0, 0xAC00); my $str22 = _pack_U(0x61, 0x0300, 0x1100, 0x1161); ok(NFD $str21 eq $str22); -ok(NFKD $str21 eq $str22); - -# 60 - -## Bug #53197: NFKC("\x{2000}") produces... - -ok(NFKC("\x{2002}") eq ' '); -ok(NFKD("\x{2002}") eq ' '); -ok(NFKC("\x{2000}") eq ' '); -ok(NFKD("\x{2000}") eq ' '); - -ok(NFKC("\x{210C}") eq 'H'); -ok(NFKD("\x{210C}") eq 'H'); -ok(NFKC("\x{210D}") eq 'H'); -ok(NFKD("\x{210D}") eq 'H'); - -ok(NFC("\x{F907}") eq "\x{9F9C}"); -ok(NFD("\x{F907}") eq "\x{9F9C}"); -ok(NFKC("\x{F907}") eq "\x{9F9C}"); -ok(NFKD("\x{F907}") eq "\x{9F9C}"); - -# 72 diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/tie.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/tie.t index 4fdd121e07e..c7214917266 100755 --- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/tie.t +++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/tie.t @@ -1,11 +1,8 @@ BEGIN { - unless ('A' eq pack('U', 0x41)) { - print "1..0 # Unicode::Normalize cannot pack a Unicode code point\n"; - exit 0; - } - unless (0x41 == unpack('U', 'A')) { - print "1..0 # Unicode::Normalize cannot get a Unicode code point\n"; + unless ("A" eq pack('U', 0x41)) { + print "1..0 # Unicode::Normalize " . + "cannot stringify a Unicode code point\n"; exit 0; } } @@ -30,20 +27,10 @@ BEGIN { } } +use Test; use strict; use warnings; -BEGIN { $| = 1; print "1..17\n"; } -my $count = 0; -sub ok ($;$) { - my $p = my $r = shift; - if (@_) { - my $x = shift; - $p = !defined $x ? !defined $r : !defined $r ? 0 : $r eq $x; - } - print $p ? "ok" : "not ok", ' ', ++$count, "\n"; -} - -ok(1); +BEGIN { plan tests => 16 }; package tiescalar; sub TIESCALAR { diff --git a/gnu/usr.bin/perl/dist/Net-Ping/t/100_load.t b/gnu/usr.bin/perl/dist/Net-Ping/t/100_load.t index fa04a0c587e..de84247632c 100755 --- a/gnu/usr.bin/perl/dist/Net-Ping/t/100_load.t +++ b/gnu/usr.bin/perl/dist/Net-Ping/t/100_load.t @@ -1,4 +1,7 @@ -use strict; +# Before `make install' is performed this script should be runnable with +# `make test'. After `make install' it should work as `perl test.t' + +######################### We start with some black magic to print on failure. BEGIN { unless (eval "require Socket") { @@ -7,6 +10,17 @@ BEGIN { } } -use Test::More tests => 1; +use Test; +BEGIN { plan tests => 1; $loaded = 0} +END { ok $loaded;} + # Just make sure everything compiles -BEGIN {use_ok 'Net::Ping'}; +use Net::Ping; + +$loaded = 1; + +######################### End of black magic. + +# Insert your test code below (better if it prints "ok 13" +# (correspondingly "not ok 13") depending on the success of chunk 13 +# of the test code): |