diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2011-01-04 19:56:15 +0700 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2011-01-04 19:56:15 +0700 |
commit | 5f6f2162512106adf120d4b528bb125e93e34429 (patch) | |
tree | 7d7449f755633c263be7125ad58d21cc3ca5b8a7 /coreutils/test.c | |
parent | 9db69882bee2d528d706d61d34ef7741122330be (diff) | |
parent | a116552869db5e7793ae10968eb3c962c69b3d8c (diff) | |
download | busybox-w32-5f6f2162512106adf120d4b528bb125e93e34429.tar.gz busybox-w32-5f6f2162512106adf120d4b528bb125e93e34429.tar.bz2 busybox-w32-5f6f2162512106adf120d4b528bb125e93e34429.zip |
Merge remote-tracking branch 'upstream/master'
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 | } |