Skip to content

Commit d4e0ee0

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

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
diff --git a/tests/misc/comm.pl b/tests/misc/comm.pl
2+
index 5bd5f56d7..5e7337f77 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},

0 commit comments

Comments
 (0)