This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Config-Perl-V to CPAN version 0.29
[perl5.git] / cpan / Config-Perl-V / t / 23_plv512.t
1 #!/pro/bin/perl
2
3 use strict;
4 use warnings;
5
6 BEGIN {
7     use Test::More;
8     my $tests = 100;
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}, "Dec 20 2010 12:46:00", "Build time");
25 is ($conf->{config}{version}, "5.12.2", "reconstructed \%Config{version}");
26 is ($conf->{config}{gccversion}, "", "not built with gcc");
27 is ($conf->{config}{ccversion}, "B3910B", "built with HP C-ANSI-C");
28
29 my $opt = Config::Perl::V::plv2hash ("")->{build}{options};
30 foreach my $o (sort qw(
31         PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL
32         USE_64_BIT_INT USE_LARGE_FILES USE_LONG_DOUBLE
33         USE_PERLIO USE_PERL_ATOF
34         )) {
35     is ($conf->{build}{options}{$o}, 1, "Runtime option $o set");
36     delete $opt->{$o};
37     }
38 foreach my $o (sort keys %$opt) {
39     is ($conf->{build}{options}{$o}, 0, "Runtime option $o unset");
40     }
41
42 eval { require Digest::MD5; };
43 my $md5 = $@ ? "0" x 32 : "a2c38153cc47d340bc140d0bfe294afb";
44 ok (my $sig = Config::Perl::V::signature ($conf), "Get signature");
45 is ($sig, $md5, "MD5");
46
47 __END__
48 Summary of my perl5 (revision 5 version 12 subversion 2) configuration:
49
50   Platform:
51     osname=hpux, osvers=11.31, archname=IA64.ARCHREV_0-LP64-ld
52     uname='hp-ux x2 b.11.31 u ia64 2977233888 unlimited-user license '
53     config_args='-Duse64bitall -Duselongdouble -des'
54     hint=recommended, useposix=true, d_sigaction=define
55     useithreads=undef, usemultiplicity=undef
56     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
57     use64bitint=define, use64bitall=define, uselongdouble=define
58     usemymalloc=n, bincompat5005=undef
59   Compiler:
60     cc='cc', ccflags =' -Ae -DPERL_DONT_CREATE_GVSV +Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ',
61     optimize='+O2 +Onolimit',
62     cppflags='-Aa -D__STDC_EXT__ -DPERL_DONT_CREATE_GVSV +Z -z -D_HPUX_SOURCE -Ae -DPERL_DONT_CREATE_GVSV +Z -z -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/pro/local/include'
63     ccversion='B3910B', gccversion='', gccosandvers=''
64     intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
65     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
66     ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
67     alignbytes=16, prototype=define
68   Linker and Libraries:
69     ld='/usr/bin/ld', ldflags ='-L/pro/local/lib +DD64 -L/usr/lib/hpux64'
70     libpth=/pro/local/lib /usr/lib/hpux64 /lib /usr/lib /usr/ccs/lib /usr/local/lib
71     libs=-lcl -lpthread -lnsl -lnm -ldb -ldl -ldld -lm -lsec -lc
72     perllibs=-lcl -lpthread -lnsl -lnm -ldl -ldld -lm -lsec -lc
73     libc=/usr/lib/hpux64/libc.so, so=so, useshrplib=false, libperl=libperl.a
74     gnulibc_version=''
75   Dynamic Linking:
76     dlsrc=dl_hpux.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred '
77     cccdlflags='+Z', lddlflags='-b +vnocompatwarnings -L/pro/local/lib -L/usr/lib/hpux64'
78
79
80 Characteristics of this binary (from libperl):
81   Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL
82                         USE_64_BIT_INT USE_LARGE_FILES USE_LONG_DOUBLE
83                         USE_PERLIO USE_PERL_ATOF
84   Built under hpux
85   Compiled at Dec 20 2010 12:46:00
86   @INC:
87     /pro/lib/perl5/site_perl/5.12.2/IA64.ARCHREV_0-LP64-ld
88     /pro/lib/perl5/site_perl/5.12.2
89     /pro/lib/perl5/5.12.2/IA64.ARCHREV_0-LP64-ld
90     /pro/lib/perl5/5.12.2
91     .