change to test builtin for parenthesized expressions when there are more than four arguments to test; tentative change to @A transformation to output declare commands for local variables

This commit is contained in:
Chet Ramey
2024-03-25 10:32:07 -04:00
parent b1e7f68032
commit 8af5a8e0ca
6 changed files with 101 additions and 32 deletions
+9
View File
@@ -323,6 +323,15 @@ t -t /dev/tty4444444...
2
./test.tests: line 26: test: : integer expected
2
1
0
0
./test.tests: line 26: test: `)' expected
2
./test.tests: line 26: test: (: unary operator expected
2
./test.tests: line 26: test: `)' expected
2
t -p /dev/fd/6
1
t -p /dev/fd/6
+11
View File
@@ -494,4 +494,15 @@ t -t /dev/tty4444444...
# fixed in bash-4.0-beta
t -t ' '
# ambiguous parenthesized test expressions with more than 4 arguments
t true -a \( ! -a \)
t true -a \( -n foo \)
t true -a \( foo \)
t 1 = 1 -a \( \)
t \( \)
t 1 = 1 -a \( \) -a -n ""
${THIS_SH} ./test1.sub