Skip to content

Commit e221d2a

Browse files
committed
comm: adapt GNU error messages
1 parent f52a11c commit e221d2a

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

util/gnu-patches/tests_comm.pl.patch

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
diff --git a/tests/misc/comm.pl b/tests/misc/comm.pl
2+
index 5bd5f56d7..8322d92ba 100755
3+
--- a/tests/misc/comm.pl
4+
+++ b/tests/misc/comm.pl
5+
@@ -73,18 +73,24 @@ my @Tests =
6+
7+
# invalid missing command line argument (1)
8+
['missing-arg1', $inputs[0], {EXIT=>1},
9+
- {ERR => "$prog: missing operand after 'a'\n"
10+
- . "Try '$prog --help' for more information.\n"}],
11+
+ {ERR => "error: the following required arguments were not provided:\n"
12+
+ . " <FILE2>\n\n"
13+
+ . "Usage: $prog [OPTION]... FILE1 FILE2\n\n"
14+
+ . "For more information, try '--help'.\n"}],
15+
16+
# invalid missing command line argument (both)
17+
['missing-arg2', {EXIT=>1},
18+
- {ERR => "$prog: missing operand\n"
19+
- . "Try '$prog --help' for more information.\n"}],
20+
+ {ERR => "error: the following required arguments were not provided:\n"
21+
+ . " <FILE1>\n"
22+
+ . " <FILE2>\n\n"
23+
+ . "Usage: $prog [OPTION]... FILE1 FILE2\n\n"
24+
+ . "For more information, try '--help'.\n"}],
25+
26+
# invalid extra command line argument
27+
['extra-arg', @inputs, 'no-such', {EXIT=>1},
28+
- {ERR => "$prog: extra operand 'no-such'\n"
29+
- . "Try '$prog --help' for more information.\n"}],
30+
+ {ERR => "error: unexpected argument 'no-such' found\n\n"
31+
+ . "Usage: $prog [OPTION]... FILE1 FILE2\n\n"
32+
+ . "For more information, try '--help'.\n"}],
33+
34+
# out-of-order input
35+
['ooo', {IN=>{a=>"1\n3"}}, {IN=>{b=>"3\n2"}}, {EXIT=>1},
36+
@@ -163,7 +169,7 @@ my @Tests =
37+
38+
# invalid dual delimiter
39+
['delim-dual', '--output-delimiter=,', '--output-delimiter=+', @inputs,
40+
- {EXIT=>1}, {ERR => "$prog: multiple output delimiters specified\n"}],
41+
+ {EXIT=>1}, {ERR => "$prog: multiple conflicting output delimiters specified\n"}],
42+
43+
# valid dual delimiter specification
44+
['delim-dual2', '--output-delimiter=,', '--output-delimiter=,', @inputs,

0 commit comments

Comments
 (0)