From: H.Merijn Brand - Tux Date: Fri, 24 May 2013 14:49:36 +0000 (+0200) Subject: New test for 5.18.0 -V output X-Git-Tag: v0.18 X-Git-Url: https://repo.or.cz/w/Config-Perl-V.git/commitdiff_plain/1b437d634c43d10dfb5c3062f79018f69f8dca4a New test for 5.18.0 -V output --- diff --git a/Changelog b/Changelog index 174af4c..e48bb3e 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ -0.18 - 17 Feb 2013, H.Merijn Brand +0.18 - 24 May 2013, H.Merijn Brand * Fixed typo in META (Chorny) * Support for using uninstalled Test::NoWarnings (RT#82386) + * Sync up with perl-5.18.0 (and 5.19.0) 0.17 - 10 Feb 2013, H.Merijn Brand * Deal with spaces in patch descriptions diff --git a/MANIFEST b/MANIFEST index 50d21bb..7e5efc2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -6,5 +6,6 @@ V.pm t/00_pod.t t/01_pod.t t/10_base.t -t/20_plv.t +t/20_plv510.t +t/21_plv518.t examples/show-v.pl diff --git a/V.pm b/V.pm index 4353594..fea6857 100644 --- a/V.pm +++ b/V.pm @@ -29,6 +29,7 @@ my %BTD = map { $_ => 0 } qw( DEBUGGING NO_MATHOMS NO_HASH_SEED + NO_TAINT_SUPPORT PERL_DISABLE_PMC PERL_DONT_CREATE_GVSV PERL_EXTERNAL_GLOB diff --git a/t/20_plv.t b/t/20_plv510.t similarity index 95% rename from t/20_plv.t rename to t/20_plv510.t index a739490..4b1e267 100644 --- a/t/20_plv.t +++ b/t/20_plv510.t @@ -18,9 +18,8 @@ BEGIN { use Config::Perl::V; ok (my $conf = Config::Perl::V::plv2hash (), "Read perl -v block"); -for (qw( build environment config inc )) { - ok (exists $conf->{build}, "Has build entry"); - } +ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); + is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); is ($conf->{build}{stamp}, 0, "No build time known"); is ($conf->{config}{version}, "5.10.0", "reconstructed \%Config{version}"); diff --git a/t/21_plv518.t b/t/21_plv518.t new file mode 100644 index 0000000..ed0a2a6 --- /dev/null +++ b/t/21_plv518.t @@ -0,0 +1,102 @@ +#!/pro/bin/perl + +use strict; +use warnings; + +BEGIN { + use Test::More; + my $tests = 35; + unless ($ENV{PERL_CORE}) { + require Test::NoWarnings; + Test::NoWarnings->import (); + $tests++; + } + + plan tests => $tests; + } + +use Config::Perl::V; + +ok (my $conf = Config::Perl::V::plv2hash (), "Read perl -v block"); +ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc ); + +is ($conf->{build}{osname}, $conf->{config}{osname}, "osname"); +is ($conf->{build}{stamp}, 0, "No build time known"); +is ($conf->{config}{version}, "5.18.0", "reconstructed \$Config{version}"); + +# Some random checks +is ($conf->{build}{options}{$_}, 0, "Runtime option $_") for qw( + DEBUG_LEAKING_SCALARS NO_HASH_SEED PERL_MEM_LOG_STDERR PERL_MEM_LOG_ENV + PERL_MEM_LOG_TIMESTAMP PERL_MICRO USE_ATTRIBUTES_FOR_PERLIO VMS_DO_SOCKETS ); + +my %check = ( + alignbytes => 4, + api_version => 18, + bincompat5005 => "undef", + byteorder => 12345678, + cc => "cc", + cccdlflags => "-fPIC", + ccdlflags => "-Wl,-E", + config_args => "-Duse64bitint -Duselongdouble -des", + gccversion => "4.7.2 20130108 [gcc-4_7-branch revision 195012]", + gnulibc_version => "2.17", + ivsize => 8, + ivtype => "long long", + ld => "cc", + lddlflags => "-shared -O3 -L/pro/local/lib -fstack-protector", + ldflags => "-L/pro/local/lib -fstack-protector", + libc => "/lib/libc-2.17.so", + lseektype => "off_t", + osvers => "3.7.10-1.4-desktop", + use64bitint => "define", + ); +is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check; + +__END__ +Summary of my perl5 (revision 5 version 18 subversion 0) configuration: + + Platform: + osname=linux, osvers=3.7.10-1.4-desktop, archname=i686-linux-64int-ld + uname='linux test 3.7.10-1.4-desktop #1 smp preempt fri apr 19 12:06:34 utc 2013 (8ef74f8) i686 i686 i386 gnulinux ' + config_args='-Duse64bitint -Duselongdouble -des' + hint=recommended, useposix=true, d_sigaction=define + useithreads=undef, usemultiplicity=undef + useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef + use64bitint=define, use64bitall=undef, uselongdouble=define + usemymalloc=n, bincompat5005=undef + Compiler: + cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', + optimize='-O3', + cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include' + ccversion='', gccversion='4.7.2 20130108 [gcc-4_7-branch revision 195012]', gccosandvers='' + intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 + d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 + ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8 + alignbytes=4, prototype=define + Linker and Libraries: + ld='cc', ldflags ='-L/pro/local/lib -fstack-protector' + libpth=/pro/local/lib /lib /usr/lib /usr/local/lib + libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat + perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc + libc=/lib/libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a + gnulibc_version='2.17' + Dynamic Linking: + dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' + cccdlflags='-fPIC', lddlflags='-shared -O3 -L/pro/local/lib -fstack-protector' + + +Characteristics of this binary (from libperl): + Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV + PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP + PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_INT + USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE + USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE + USE_PERLIO USE_PERL_ATOF + Built under linux + Compiled at May 18 2013 17:34:20 + @INC: + /pro/lib/perl5/site_perl/5.18.0/i686-linux-64int-ld + /pro/lib/perl5/site_perl/5.18.0 + /pro/lib/perl5/5.18.0/i686-linux-64int-ld + /pro/lib/perl5/5.18.0 + .