6 skip_all_if_miniperl();
11 my $perlio_log = "perlio$$.txt";
13 skip_all "DEBUGGING build required"
14 unless $::Config{ccflags} =~ /(?<!\S)-DDEBUGGING(?!\S)/
15 or $^O eq 'VMS' && $::Config{usedebugging_perl} eq 'Y';
24 local $ENV{PERLIO_DEBUG} = $perlio_log;
25 fresh_perl_is("print qq(hello\n)", "hello\n",
27 "No perlio debug file without -Di...");
28 ok(!-e $perlio_log, "...no perlio.txt found");
29 fresh_perl_like("print qq(hello\n)", qr/\nEXECUTING...\n{1,2}hello\n?/,
30 { stderr => 1, switches => [ "-Di" ] },
31 "Perlio debug file with both -Di and PERLIO_DEBUG...");
32 ok(-e $perlio_log, "... perlio debugging file found with -Di and PERLIO_DEBUG");
35 fresh_perl_like("print qq(hello\n)", qr/define raw/,
36 { stderr => 1, switches => [ "-TDi" ] },
37 "Perlio debug output to stderr with -TDi (with PERLIO_DEBUG)...");
38 ok(!-e $perlio_log, "...no perlio debugging file found");
42 local $ENV{PERLIO_DEBUG};
43 fresh_perl_like("print qq(hello)", qr/define raw/,
44 { stderr => 1, switches => [ '-Di' ] },
45 "-Di defaults to stderr");
46 fresh_perl_like("print qq(hello)", qr/define raw/,
47 { stderr => 1, switches => [ '-TDi' ] },
48 "Perlio debug output to STDERR with -TDi (no PERLIO_DEBUG)");