Debian Codegraph @

util/gnu-patches/tests_invalid_opt.patch

raw
1 Index: gnu/tests/misc/invalid-opt.pl
2 ===================================================================
3 --- gnu.orig/tests/misc/invalid-opt.pl
4 +++ gnu/tests/misc/invalid-opt.pl
5 @@ -74,23 +74,13 @@ foreach my $prog (@built_programs)
6 defined $out
7 or $out = '';
8
9 - my $err = $expected_err{$prog};
10 - defined $err
11 - or $err = $x == 0 ? '' : "$prog: invalid option -- /\n$try";
12 -
13 - # Accommodate different syntax in glibc's getopt
14 - # diagnostics by filtering out single quotes.
15 - # Also accommodate BSD getopt.
16 - my $err_subst = "s,'/',/,; s,unknown,invalid,";
17 -
18 - # Depending on how this script is run, stty emits different
19 - # diagnostics. Don't bother checking them.
20 - $prog eq 'stty'
21 - and $err_subst = 's/(.|\n)*//ms';
22 + # Strip all stderr output
23 + # Our output is better and more consistent
24 + my $err_subst = 's/(.|\n)*//ms';
25
26 my @Tests = (["$prog-invalid-opt", '-/', {OUT=>$out},
27 {ERR_SUBST => $err_subst},
28 - {EXIT=>$x}, {ERR=>$err}]);
29 + {EXIT=>$x}]);
30
31 my $save_temps = $ENV{DEBUG};
32 my $verbose = $ENV{VERBOSE};