10 if ($^O eq 'MSWin32') {
15 ($cpp) = $Config{cppstdin} =~ /^(\S+)/;
20 print "1..0 # Skipping cpp not found on this system.\n" ;
24 # Check if cpp is installed
27 foreach my $dir (split($sep, $ENV{PATH}), '')
37 print "1..0 # Skipping cpp not found on this system.\n" ;
43 use vars qw( $Inc $Perl ) ;
45 require "./filter-util.pl" ;
47 my $script = <<'EOF' ;
52 #a perl comment, not a cpp line
62 print "Where is Joe?\n" ;
66 my $cpp_script = 'cpp.script' ;
67 writeFile($cpp_script, $script) ;
68 writeFile('fred', 'print "This is FRED, not JOE\n" ; 1 ;') ;
70 my $expected_output = <<'EOM' ;
76 $a = `$Perl $Inc $cpp_script 2>&1` ;
79 ok(1, ($? >>8) == 0) ;
80 #print "|$a| vs |$expected_output|\n";
81 ok(2, $a eq $expected_output) ;