This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/mk_invlists.pl: White-space only
[perl5.git] / cpan / Config-Perl-V / t / 21_plv518.t
1 #!/pro/bin/perl
2
3 use strict;
4 use warnings;
5
6 BEGIN {
7     use Test::More;
8     my $tests = 35;
9     unless ($ENV{PERL_CORE}) {
10         require Test::NoWarnings;
11         Test::NoWarnings->import ();
12         $tests++;
13         }
14
15     plan tests => $tests;
16     }
17
18 use Config::Perl::V;
19
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 );
22
23 is ($conf->{build}{osname}, $conf->{config}{osname}, "osname");
24 is ($conf->{build}{stamp}, 0, "No build time known");
25 is ($conf->{config}{version}, "5.18.0", "reconstructed \$Config{version}");
26
27 # Some random checks
28 is ($conf->{build}{options}{$_}, 0, "Runtime option $_") for qw(
29     DEBUG_LEAKING_SCALARS NO_HASH_SEED PERL_MEM_LOG_STDERR PERL_MEM_LOG_ENV
30     PERL_MEM_LOG_TIMESTAMP PERL_MICRO USE_ATTRIBUTES_FOR_PERLIO VMS_DO_SOCKETS );
31
32 my %check = (
33     alignbytes      => 4,
34     api_version     => 18,
35     bincompat5005   => "undef",
36     byteorder       => 12345678,
37     cc              => "cc",
38     cccdlflags      => "-fPIC",
39     ccdlflags       => "-Wl,-E",
40     config_args     => "-Duse64bitint -Duselongdouble -des",
41     gccversion      => "4.7.2 20130108 [gcc-4_7-branch revision 195012]",
42     gnulibc_version => "2.17",
43     ivsize          => 8,
44     ivtype          => "long long",
45     ld              => "cc",
46     lddlflags       => "-shared -O3 -L/pro/local/lib -fstack-protector",
47     ldflags         => "-L/pro/local/lib -fstack-protector",
48     libc            => "/lib/libc-2.17.so",
49     lseektype       => "off_t",
50     osvers          => "3.7.10-1.4-desktop",
51     use64bitint     => "define",
52     );
53 is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check;
54
55 __END__
56 Summary of my perl5 (revision 5 version 18 subversion 0) configuration:
57    
58   Platform:
59     osname=linux, osvers=3.7.10-1.4-desktop, archname=i686-linux-64int-ld
60     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 '
61     config_args='-Duse64bitint -Duselongdouble -des'
62     hint=recommended, useposix=true, d_sigaction=define
63     useithreads=undef, usemultiplicity=undef
64     use64bitint=define, use64bitall=undef, uselongdouble=define
65     usemymalloc=n, bincompat5005=undef
66   Compiler:
67     cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
68     optimize='-O3',
69     cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include'
70     ccversion='', gccversion='4.7.2 20130108 [gcc-4_7-branch revision 195012]', gccosandvers=''
71     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
72     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
73     ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8
74     alignbytes=4, prototype=define
75   Linker and Libraries:
76     ld='cc', ldflags ='-L/pro/local/lib -fstack-protector'
77     libpth=/pro/local/lib /lib /usr/lib /usr/local/lib
78     libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
79     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
80     libc=/lib/libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a
81     gnulibc_version='2.17'
82   Dynamic Linking:
83     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
84     cccdlflags='-fPIC', lddlflags='-shared -O3 -L/pro/local/lib -fstack-protector'
85
86
87 Characteristics of this binary (from libperl): 
88   Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
89                         PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
90                         PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_INT
91                         USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
92                         USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE
93                         USE_PERLIO USE_PERL_ATOF
94   Built under linux
95   Compiled at May 18 2013 17:34:20
96   @INC:
97     /pro/lib/perl5/site_perl/5.18.0/i686-linux-64int-ld
98     /pro/lib/perl5/site_perl/5.18.0
99     /pro/lib/perl5/5.18.0/i686-linux-64int-ld
100     /pro/lib/perl5/5.18.0
101     .