From 5ba5996e021177c1c7ddec0dd8525af9b2d14a39 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 17 Oct 2013 15:50:12 +0200 Subject: [PATCH] Tester: Compare stderr if requested --- build/tester | 8 ++++++++ 1 file changed, 8 insertions(+) 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"}) { -- 2.39.2