diff options
Diffstat (limited to 'coreutils/test.c')
-rw-r--r-- | coreutils/test.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/coreutils/test.c b/coreutils/test.c index 1952337b3..3e9ab7c65 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -49,9 +49,9 @@ | |||
49 | * state. */ | 49 | * state. */ |
50 | 50 | ||
51 | /* test(1) accepts the following grammar: | 51 | /* test(1) accepts the following grammar: |
52 | oexpr ::= aexpr | aexpr "-o" oexpr ; | 52 | oexpr ::= aexpr | aexpr "-o" oexpr ; |
53 | aexpr ::= nexpr | nexpr "-a" aexpr ; | 53 | aexpr ::= nexpr | nexpr "-a" aexpr ; |
54 | nexpr ::= primary | "!" primary | 54 | nexpr ::= primary | "!" primary |
55 | primary ::= unary-operator operand | 55 | primary ::= unary-operator operand |
56 | | operand binary-operator operand | 56 | | operand binary-operator operand |
57 | | operand | 57 | | operand |
@@ -901,7 +901,10 @@ int test_main(int argc, char **argv) | |||
901 | res = !oexpr(check_operator(*args)); | 901 | res = !oexpr(check_operator(*args)); |
902 | 902 | ||
903 | if (*args != NULL && *++args != NULL) { | 903 | if (*args != NULL && *++args != NULL) { |
904 | /* TODO: example when this happens? */ | 904 | /* Examples: |
905 | * test 3 -lt 5 6 | ||
906 | * test -t 1 2 | ||
907 | */ | ||
905 | bb_error_msg("%s: unknown operand", *args); | 908 | bb_error_msg("%s: unknown operand", *args); |
906 | res = 2; | 909 | res = 2; |
907 | } | 910 | } |