Lines Matching full:config
10 use_ok('Config');
17 cmp_ok(keys %Config, '>', 500, "Config has more than 500 entries");
19 my ($first) = Config::config_sh() =~ /^(\S+)=/m;
20 die "Can't find first entry in Config::config_sh()" unless defined $first;
25 my ($first_each) = each %Config;
27 ok(exists($Config{$first_each}), "First key exists");
28 ok(!exists($Config{"\n$first"}),
31 is($Config{PERL_REVISION}, 5, "PERL_REVISION is 5");
33 # Check that old config variable names are aliased to their new ones.
37 PERL_CONFIG_SH => 'CONFIG'
40 isnt($Config{$new}, undef, "$new is defined");
41 is($Config{$new}, $Config{$old}, "$new is aliased to $old");
44 ok( exists $Config{cc}, "has cc");
46 ok( exists $Config{ccflags}, "has ccflags");
48 ok(!exists $Config{python}, "has no python");
50 ok( exists $Config{d_fork}, "has d_fork");
52 ok(!exists $Config{d_bork}, "has no d_bork");
57 ok( exists $Config{taint_support}, "has taint_support");
59 ok( exists $Config{taint_disabled}, "has taint_disabled");
61 is( $Config{taint_support}, ($Config{taint_disabled} ? "" : "define"),
64 ok( ($Config{taint_support} eq "" or $Config{taint_support} eq "define"),
67 ok( ( $Config{taint_disabled} eq "" or $Config{taint_disabled} eq "silent" or
68 $Config{taint_disabled} eq "define"),
71 my @opts = Config::non_bincompat_options();
81 is( $Config{taint_disabled}, $want_taint_disabled[$no_taint_support_count],
83 is( $Config{taint_support}, $want_taint_support[$no_taint_support_count],
87 like($Config{ivsize}, qr/^(4|8)$/, "ivsize is 4 or 8 (it is $Config{ivsize})");
91 like($Config{byteorder}, qr/^(1234|4321|12345678|87654321)$/,
93 . "(it is $Config{byteorder})");
95 is(length $Config{byteorder}, $Config{ivsize},
96 "byteorder is as long as ivsize (which is $Config{ivsize})");
100 ok(exists $Config{ccflags_nolargefiles}, "has ccflags_nolargefiles");
108 Config->import(@exports);
114 like(Config::myconfig(), qr/osname=\Q$Config{osname}\E/, "myconfig");
115 like(Config::config_sh(), qr/osname='\Q$Config{osname}\E'/, "config_sh");
116 like(Config::config_sh(), qr/byteorder='[1-8]+'/,
118 foreach my $line (Config::config_re('c.*')) {
124 Config::config_vars('cc'); # non-regex test of essential cfg-var
128 Config::config_vars('d_bork'); # non-regex, non-existent cfg-var
132 Config::config_vars('PERL_API_.*'); # regex, tagged multi-line answer
136 Config::config_vars('PERL_API_.*:'); # regex, tagged single-line answer
140 Config::config_vars(':PERL_API_.*:'); # regex, non-tagged single-line answer
144 Config::config_vars(':PERL_API_.*'); # regex, non-tagged multi-line answer
148 Config::config_vars('PERL_API_REVISION.*:'); # regex, tagged
153 Config::config_vars(':PERL_API_REVISION.*');
157 Config::config_vars('PERL_EXPENSIVE_.*:'); # non-matching regex
161 Config::config_vars('?flags'); # bogus regex, no explicit warning !
168 like($out1, qr/^cc='\Q$Config{cc}\E';/, "found config_var cc");
185 my @rev = @Config{qw(PERL_API_REVISION PERL_API_VERSION PERL_API_SUBVERSION)};
216 eval { $Config{d_bork} = 'borkbork' };
217 like($@, qr/Config is read-only/, "no STORE");
219 ok(!exists $Config{d_bork}, "still no d_bork");
222 eval { delete $Config{d_fork} };
223 like($@, qr/Config is read-only/, "no DELETE");
225 ok( exists $Config{d_fork}, "still d_fork");
228 eval { %Config = () };
229 like($@, qr/Config is read-only/, "no CLEAR");
231 ok( exists $Config{d_fork}, "still d_fork");
253 is($Config{sig_num_init} =~ tr/,/,/, $Config{sig_size}, "sig_num_init size");
254 is($Config{sig_name_init} =~ tr/,/,/, $Config{sig_size}, "sig_name_init size");
260 # Also test that the first entry in config.sh is found correctly. There was
264 # No config var is named with anything that is a regexp metachar
265 ok(exists $Config{$pain}, "\$config('$pain') exists");
267 my @result = $Config{$pain};
268 is (scalar @result, 1, "single result for \$config('$pain')");
270 @result = Config::config_re($pain);
272 like ($result[0], qr/^$pain=(['"])\Q$Config{$pain}\E\1$/, # grr '
276 # Check that config entries appear correctly in @INC
296 my $dir = $Config{$lib};