diff options
Diffstat (limited to 'bin/test/test.c')
-rw-r--r-- | bin/test/test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/test/test.c b/bin/test/test.c index b9a8ebf..832257e 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -161,7 +161,7 @@ main(argc, argv) } break; case 4: /* % test ! arg1 op arg2 */ - if (IS_BANG(argv[1])) { + if (IS_BANG(argv[1]) && lookup_op(argv[3], andor_op) < 0 ) { ret_val = posix_binary_op(&argv[2]); if (ret_val >= 0) return (!ret_val); @@ -528,7 +528,8 @@ get_int(v, lp) char *ep; for (; *v && isspace(*v); ++v); - if (isdigit(*v)) { + + if (isdigit(*v) || ((*v == '-' || *v == '+') && isdigit(*(v+1)))) { errno = 0; val = strtol(v, &ep, 10); if (*ep != '\0') |