File: tests_invalid_opt.patch

package info (click to toggle)
rust-coreutils 0.0.30-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,388 kB
  • sloc: sh: 1,088; python: 407; javascript: 72; makefile: 51
file content (32 lines) | stat: -rw-r--r-- 1,145 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Index: gnu/tests/misc/invalid-opt.pl
===================================================================
--- gnu.orig/tests/misc/invalid-opt.pl
+++ gnu/tests/misc/invalid-opt.pl
@@ -74,23 +74,13 @@ foreach my $prog (@built_programs)
     defined $out
       or $out = '';
 
-    my $err = $expected_err{$prog};
-    defined $err
-      or $err = $x == 0 ? '' : "$prog: invalid option -- /\n$try";
-
-    # Accommodate different syntax in glibc's getopt
-    # diagnostics by filtering out single quotes.
-    # Also accommodate BSD getopt.
-    my $err_subst = "s,'/',/,; s,unknown,invalid,";
-
-    # Depending on how this script is run, stty emits different
-    # diagnostics.  Don't bother checking them.
-    $prog eq 'stty'
-      and $err_subst = 's/(.|\n)*//ms';
+    # Strip all stderr output
+    # Our output is better and more consistent
+    my $err_subst = 's/(.|\n)*//ms';
 
     my @Tests = (["$prog-invalid-opt", '-/', {OUT=>$out},
                   {ERR_SUBST => $err_subst},
-                  {EXIT=>$x}, {ERR=>$err}]);
+                  {EXIT=>$x}]);
 
     my $save_temps = $ENV{DEBUG};
     my $verbose = $ENV{VERBOSE};