[rewrote test/handlers.pl ; now can check for expected/unexpected errors ganesh@earth.li**20040405054515] { hunk ./test/handlers.pl 23 +my $cancatch=0; +my @pendingerrors=(); +my @expectederrors=(); + hunk ./test/handlers.pl 31 -# $PhotoPub::Global::error=sub { }; + $PhotoPub::Global::error=sub { + my %error=@_; + push @pendingerrors,\%error; + return if $error{'type'} eq 'warning'; + goto ONERROR if $cancatch>0; + &flusherrors(); + die; + }; hunk ./test/handlers.pl 44 -foreach my $script (@ARGV) { - open SCRIPT,"<$script" or die "Couldn't read $script"; - my $untilend=sub { - my $finished=0; - my $tocall=shift; - my $readline=sub { - return undef if $finished; - return undef if eof(SCRIPT); - my $in; - do { - $in=