1N/A chdir 't' if -d 't'; 1N/A @INC = ('../lib', 'lib', '.'); 1N/Aplan( 9 );
# And someone's responsible. 1N/A# use() makes it difficult to avoid O::import() 1N/Amy @
args =
('-Ilib', '-MO=success,foo,bar', '-e', '1' );
1N/Ais( $lines[0], 'Compiling!', 'Output should not be saved without -q switch' );
1N/Ais( $lines[1], '(foo) <bar>', 'O.pm should call backend compile() method' );
1N/Ais( $lines[2], '[]', 'Nothing should be in $O::BEGIN_output without -q' );
1N/Ais( $lines[3], '-e syntax OK', 'O.pm should not munge perl output without -qq');
1N/Aisnt( $lines[1], 'Compiling!', 'Output should not be printed with -q switch' );
1N/A skip( '-q redirection does not work without PerlIO', 2) 1N/A is( $lines[1], "[Compiling!", '... but should be in $O::BEGIN_output' ); 1N/A 'O.pm should die if backend compile() does not return a subref' );
1N/Aprint "Compiling!\n";
1N/A return 'fail' if ($_[0] eq 'fail'); 1N/A print "($_[0]) <$_[1]>\n"; 1N/A return sub { print "[$O::BEGIN_output]\n" };