Many fixes after CPANTESTERS report
[Config-Perl-V.git] / t / 27_plv5200.t
blob2b3fa5dca28064de29f5623f8434e37e2dea2470
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}, "Jun 30 2014 15:37:09", "Build time");
25 is ($conf->{config}{version}, "5.20.0", "reconstructed \$Config{version}");
27 my $opt = Config::Perl::V::plv2hash ("")->{build}{options};
28 foreach my $o (sort qw(
29 HAS_TIMES MULTIPLICITY PERLIO_LAYERS
30 PERL_DONT_CREATE_GVSV
31 PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
32 PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
33 PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
34 PERL_USE_DEVEL USE_64_BIT_INT USE_ITHREADS
35 USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
36 USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE
37 USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
38 )) {
39 is ($conf->{build}{options}{$o}, 1, "Runtime option $o set");
40 delete $opt->{$o};
42 foreach my $o (sort keys %$opt) {
43 is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset");
46 is_deeply ($conf->{build}{patches}, [], "No local patches");
48 my %check = (
49 alignbytes => 4,
50 api_version => 20,
51 bincompat5005 => "undef",
52 byteorder => 12345678,
53 cc => "cc",
54 cccdlflags => "-fPIC",
55 ccdlflags => "-Wl,-E",
56 config_args => "-Dusedevel -Uversiononly -Dinc_version_list=none -Duse64bitint -Dusethreads -Duseithreads -Duselongdouble -des",
57 gccversion => "4.8.1 20130909 [gcc-4_8-branch revision 202388]",
58 gnulibc_version => "2.18",
59 ivsize => 8,
60 ivtype => "long long",
61 ld => "cc",
62 lddlflags => "-shared -O2 -L/pro/local/lib -fstack-protector",
63 ldflags => "-L/pro/local/lib -fstack-protector",
64 libc => "libc-2.18.so",
65 lseektype => "off_t",
66 osvers => "3.11.10-17-desktop",
67 use64bitint => "define",
69 is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check;
71 __END__
72 Summary of my perl5 (revision 5 version 20 subversion 0) configuration:
74 Platform:
75 osname=linux, osvers=3.11.10-17-desktop, archname=i686-linux-thread-multi-64int-ld
76 uname='linux lx09 3.11.10-17-desktop #1 smp preempt mon jun 16 15:28:13 utc 2014 (fba7c1f) i686 i686 i386 gnulinux '
77 config_args='-Dusedevel -Uversiononly -Dinc_version_list=none -Duse64bitint -Dusethreads -Duseithreads -Duselongdouble -des'
78 hint=recommended, useposix=true, d_sigaction=define
79 useithreads=define, usemultiplicity=define
80 use64bitint=define, use64bitall=undef, uselongdouble=define
81 usemymalloc=n, bincompat5005=undef
82 Compiler:
83 cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
84 optimize='-O2',
85 cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include'
86 ccversion='', gccversion='4.8.1 20130909 [gcc-4_8-branch revision 202388]', gccosandvers=''
87 intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
88 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
89 ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8
90 alignbytes=4, prototype=define
91 Linker and Libraries:
92 ld='cc', ldflags ='-L/pro/local/lib -fstack-protector'
93 libpth=/usr/local/lib /usr/lib/gcc/i586-suse-linux/4.8/include-fixed /usr/lib/gcc/i586-suse-linux/4.8/../../../../i586-suse-linux/lib /usr/lib /pro/local/lib /lib
94 libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
95 perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
96 libc=libc-2.18.so, so=so, useshrplib=false, libperl=libperl.a
97 gnulibc_version='2.18'
98 Dynamic Linking:
99 dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
100 cccdlflags='-fPIC', lddlflags='-shared -O2 -L/pro/local/lib -fstack-protector'
103 Characteristics of this binary (from libperl):
104 Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
105 PERL_DONT_CREATE_GVSV
106 PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
107 PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
108 PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
109 PERL_USE_DEVEL USE_64_BIT_INT USE_ITHREADS
110 USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
111 USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE
112 USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
113 Built under linux
114 Compiled at Jun 30 2014 15:37:09
115 @INC:
116 /pro/lib/perl5/site_perl/5.20.0/i686-linux-thread-multi-64int-ld
117 /pro/lib/perl5/site_perl/5.20.0
118 /pro/lib/perl5/5.20.0/i686-linux-thread-multi-64int-ld
119 /pro/lib/perl5/5.20.0