From: Martin Mares Date: Thu, 17 Oct 2013 13:50:12 +0000 (+0200) Subject: Tester: Compare stderr if requested X-Git-Tag: v5.99~74 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5ba5996e021177c1c7ddec0dd8525af9b2d14a39;p=libucw.git Tester: Compare stderr if requested --- diff --git a/build/tester b/build/tester index 0fdbeb9f..6a827b19 100755 --- a/build/tester +++ b/build/tester @@ -13,6 +13,7 @@ # replaced by file names of In or Out files (see below). # In: lines to pass to the program as standard input # Out: lines to expect at the program's standard output +# Err: lines to expect at the program's standard error output # In: lines to pass to the program as input file # Out: lines to expect from the program in output file # Both In and Out can be specified simultaneously if we @@ -109,6 +110,13 @@ TEST: foreach $tt (@tests) { } else { $redirs .= " >/dev/null"; } + if (defined $tt->{'Err'}) { + my $efi = "tmp/test$i.err"; + unlink "$rundir/$efi"; + $redirs .= " 2>$efi"; + push @out_files, $efi; + push @out_checks, $tt->{'Err'}; + } foreach my $arg (0..9) { my $f = "tmp/test$i.$arg"; if (defined $tt->{"Out$arg"}) {