Symptoms: $ test \( string1 -a string2 \) /usr/local/bin/ksh: test: argument expected $ test \( string1 -o string2 \) /usr/local/bin/ksh: test: argument expected The parentheses should be irrelevant and this should be a test for the non-emptiness of string1 and/or string2. src/cmd/ksh93/bltins/test.c: - b_test(): There is a block where the case of 'test' with five or less arguments, the first and last one being parentheses, is special-cased. The parentheses are removed as a workaround: argv is increased to skip the opening parenthesis and argc is decreased by 2. However, there is no corresponding increase of tdata.av which is a copy of this function's argv. This renders the workaround ineffective. The fix is to add that increase. - e3(): Do not handle '!' as a negator if not followed by an argument. This allows a right-hand expression that is equal to '!' (i.e. a test for the non-emptiness of the string '!'). |
||
|---|---|---|
| .. | ||
| INIT | ||
| builtin | ||
| ksh93 | ||
| Mamfile | ||