@@ -29,28 +29,28 @@ Index: gnu/tests/numfmt/numfmt.pl
2929 ['field-range-err-6', '--field - --field 1- --to=si 10',
3030- {EXIT=>1}, {ERR=>"$prog: multiple field specifications\n"}],
3131+ {EXIT=>1},
32- + {ERR_SUBST=>"s/\n.*//s "},
33- + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times"}],
32+ + {ERR_SUBST=>"s/^(?!error:).*\\n?// "},
33+ + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times\n "}],
3434 ['field-range-err-7', '--field -1 --field 1- --to=si 10',
3535- {EXIT=>1}, {ERR=>"$prog: multiple field specifications\n"}],
3636+ {EXIT=>1},
37- + {ERR_SUBST=>"s/\n.*//s "},
38- + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times"}],
37+ + {ERR_SUBST=>"s/^(?!error:).*\\n?// "},
38+ + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times\n "}],
3939 ['field-range-err-8', '--field -1 --field 1,2,3 --to=si 10',
4040- {EXIT=>1}, {ERR=>"$prog: multiple field specifications\n"}],
4141+ {EXIT=>1},
42- + {ERR_SUBST=>"s/\n.*//s "},
43- + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times"}],
42+ + {ERR_SUBST=>"s/^(?!error:).*\\n?// "},
43+ + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times\n "}],
4444 ['field-range-err-9', '--field 1- --field 1,2,3 --to=si 10',
4545- {EXIT=>1}, {ERR=>"$prog: multiple field specifications\n"}],
4646+ {EXIT=>1},
47- + {ERR_SUBST=>"s/\n.*//s "},
48- + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times"}],
47+ + {ERR_SUBST=>"s/^(?!error:).*\\n?// "},
48+ + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times\n "}],
4949 ['field-range-err-10','--field 1,2,3 --field 1- --to=si 10',
5050- {EXIT=>1}, {ERR=>"$prog: multiple field specifications\n"}],
5151+ {EXIT=>1},
52- + {ERR_SUBST=>"s/\n.*//s "},
53- + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times"}],
52+ + {ERR_SUBST=>"s/^(?!error:).*\\n?// "},
53+ + {ERR=>"error: the argument '--field <FIELDS>' cannot be used multiple times\n "}],
5454 ['field-range-err-11','--field 1-2-3 --to=si 10',
5555- {EXIT=>1}, {ERR=>"$prog: invalid field range\n$try"}],
5656+ {EXIT=>1}, {ERR=>"$prog: range '1-2-3' was invalid: failed to parse range\n"}],
@@ -113,17 +113,8 @@ Index: gnu/tests/numfmt/numfmt.pl
113113 ['help-1', '--foobar',
114114- {ERR=>"$prog: unrecognized option\n$try"},
115115- {ERR_SUBST=>"s/option.*/option/; s/unknown/unrecognized/"},
116- + {ERR=>"error: unexpected argument '--foobar' found"},
117- + {ERR_SUBST=>"s/\n.*//s "},
116+ + {ERR=>"error: unexpected argument '--foobar' found\n "},
117+ + {ERR_SUBST=>"s/^(?!error:).*\\n?// "},
118118 {EXIT=>1}],
119119
120120 ## Format string - check error detection
121- @@ -1097,7 +1106,7 @@ my @Limit_Tests =
122- {EXIT => 2}],
123- );
124- # Restrict these tests to systems with LDBL_DIG == 18
125- - (system "$prog ---debug 1 2>&1|grep 'MAX_UNSCALED_DIGITS: 18' > /dev/null") == 0
126- + (system "$prog --debug 1 2>&1|grep 'MAX_UNSCALED_DIGITS: 18' > /dev/null") == 0
127- and push @Tests, @Limit_Tests;
128-
129- my $lg = ' ';
0 commit comments