Many fixes after CPANTESTERS report
[Config-Perl-V.git] / t / 26_plv518.t
blobf9dbc9a49bc58895d4ef14f4ca866ec74dc4a288
1 #!/pro/bin/perl
3 use strict;
4 use warnings;
6 BEGIN {
7 use Test::More;
8 my $tests = 111;
9 unless ($ENV{PERL_CORE}) {
10 require Test::NoWarnings;
11 Test::NoWarnings->import ();
12 $tests++;
15 plan tests => $tests;
18 use Config::Perl::V;
20 ok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block");
21 ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc );
23 is ($conf->{build}{osname}, $conf->{config}{osname}, "osname");
24 is ($conf->{build}{stamp}, "May 18 2013 17:34:20", "Build time");
25 is ($conf->{config}{version}, "5.18.0", "reconstructed \$Config{version}");
27 my $opt = Config::Perl::V::plv2hash ("")->{build}{options};
28 foreach my $o (sort qw(
29 HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
30 PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
31 PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_INT
32 USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
33 USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE
34 USE_PERLIO USE_PERL_ATOF
35 )) {
36 is ($conf->{build}{options}{$o}, 1, "Runtime option $o set");
37 delete $opt->{$o};
39 foreach my $o (sort keys %$opt) {
40 is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset");
43 is_deeply ($conf->{build}{patches}, [], "No local patches");
45 my %check = (
46 alignbytes => 4,
47 api_version => 18,
48 bincompat5005 => "undef",
49 byteorder => 12345678,
50 cc => "cc",
51 cccdlflags => "-fPIC",
52 ccdlflags => "-Wl,-E",
53 config_args => "-Duse64bitint -Duselongdouble -des",
54 gccversion => "4.7.2 20130108 [gcc-4_7-branch revision 195012]",
55 gnulibc_version => "2.17",
56 ivsize => 8,
57 ivtype => "long long",
58 ld => "cc",
59 lddlflags => "-shared -O3 -L/pro/local/lib -fstack-protector",
60 ldflags => "-L/pro/local/lib -fstack-protector",
61 libc => "/lib/libc-2.17.so",
62 lseektype => "off_t",
63 osvers => "3.7.10-1.4-desktop",
64 use64bitint => "define",
66 is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check;
68 __END__
69 Summary of my perl5 (revision 5 version 18 subversion 0) configuration:
71 Platform:
72 osname=linux, osvers=3.7.10-1.4-desktop, archname=i686-linux-64int-ld
73 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 '
74 config_args='-Duse64bitint -Duselongdouble -des'
75 hint=recommended, useposix=true, d_sigaction=define
76 useithreads=undef, usemultiplicity=undef
77 useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
78 use64bitint=define, use64bitall=undef, uselongdouble=define
79 usemymalloc=n, bincompat5005=undef
80 Compiler:
81 cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
82 optimize='-O3',
83 cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include'
84 ccversion='', gccversion='4.7.2 20130108 [gcc-4_7-branch revision 195012]', gccosandvers=''
85 intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
86 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
87 ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8
88 alignbytes=4, prototype=define
89 Linker and Libraries:
90 ld='cc', ldflags ='-L/pro/local/lib -fstack-protector'
91 libpth=/pro/local/lib /lib /usr/lib /usr/local/lib
92 libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
93 perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
94 libc=/lib/libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a
95 gnulibc_version='2.17'
96 Dynamic Linking:
97 dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
98 cccdlflags='-fPIC', lddlflags='-shared -O3 -L/pro/local/lib -fstack-protector'
101 Characteristics of this binary (from libperl):
102 Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
103 PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
104 PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_INT
105 USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
106 USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE
107 USE_PERLIO USE_PERL_ATOF
108 Built under linux
109 Compiled at May 18 2013 17:34:20
110 @INC:
111 /pro/lib/perl5/site_perl/5.18.0/i686-linux-64int-ld
112 /pro/lib/perl5/site_perl/5.18.0
113 /pro/lib/perl5/5.18.0/i686-linux-64int-ld
114 /pro/lib/perl5/5.18.0