13 ok(keys %Config > 500, "Config has more than 500 entries");
17 is($Config{PERL_REVISION}, 5, "PERL_REVISION is 5");
19 ok( exists $Config{cc}, "has cc");
21 ok( exists $Config{ccflags}, "has ccflags");
23 ok(!exists $Config{python}, "has no python");
25 ok( exists $Config{d_fork}, "has d_fork");
27 ok(!exists $Config{d_bork}, "has no d_bork");
29 like($Config{ivsize}, qr/^(4|8)$/, "ivsize is 4 or 8 (it is $Config{ivsize})");
31 # byteorder is virtual, but it has rules.
33 like($Config{byteorder}, qr/^(1234|4321|12345678|87654321)$/, "byteorder is 1234 or 4321 or 12345678 or 87654321 (it is $Config{byteorder})");
35 is(length $Config{byteorder}, $Config{ivsize}, "byteorder is as long as ivsize (which is $Config{ivsize})");
37 # ccflags_nolargefiles is virtual, too.
39 ok(exists $Config{ccflags_nolargefiles}, "has ccflags_nolargefiles");
43 like(Config::myconfig(), qr/cc='$Config{cc}'/, "myconfig");
46 skip "cc is tied in $^O", 1 if $^O eq 'MacOS';
47 like(Config::config_sh(), qr/cc='$Config{cc}'/, "config_sh");
50 my $out = tie *STDOUT, 'FakeOut';
52 Config::config_vars('cc');
56 Config::config_vars('d_bork');
62 like($out1, qr/^cc='$Config{cc}';/, "config_vars cc");
63 like($out2, qr/^d_bork='UNKNOWN';/, "config_vars d_bork is UNKNOWN");
68 eval { $Config{d_bork} = 'borkbork' };
69 like($@, qr/Config is read-only/, "no STORE");
71 ok(!exists $Config{d_bork}, "still no d_bork");
74 eval { delete $Config{d_fork} };
75 like($@, qr/Config is read-only/, "no DELETE");
77 ok( exists $Config{d_fork}, "still d_fork");
80 eval { %Config = () };
81 like($@, qr/Config is read-only/, "no CLEAR");
83 ok( exists $Config{d_fork}, "still d_fork");
88 bless(\(my $text), $_[0]);
97 $$self .= join('', @_);