On Thursday 03 August 2006 13:41, Philip M. Gollucci wrote: > Now, > is there a way to programatically check the t/logs/error_log for the > existance / non existance of the A::SL child killed message ? In the mean > time, this at least exercises the code that caused David Wheeler's error.
In one of my tests I use this: { my $f; sub t_start_error_log_watch { my $name=File::Spec->catfile( Apache::Test::vars->{t_logs}, 'error_log' ); open $f, "$name" or die "ERROR: Cannot open $name: $!\n"; seek $f, 0, 2; } sub t_finish_error_log_watch { local $/="\n"; my @lines=<$f>; undef $f; return @lines; } } then t_start_error_log_watch; do_it; ok grep {...} t_finish_error_log_watch; Torsten
pgpFtbcAVaW8d.pgp
Description: PGP signature