mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 02:02:42 +02:00
more error checking for hash builtin; fix for [[ builtin and some test syntax errors
This commit is contained in:
+3
-1
@@ -12,6 +12,8 @@ returns: 0
|
||||
returns: 0
|
||||
returns: 1
|
||||
returns: 0
|
||||
./cond.tests: line 65: [[: X: integer expected
|
||||
returns: 2
|
||||
returns: 0
|
||||
returns: 1
|
||||
returns: 1
|
||||
@@ -27,7 +29,7 @@ returns: 0
|
||||
returns: 1
|
||||
returns: 1
|
||||
returns: 0
|
||||
./cond.tests: line 122: [[: 4+: arithmetic syntax error: operand expected (error token is "+")
|
||||
./cond.tests: line 126: [[: 4+: arithmetic syntax error: operand expected (error token is "+")
|
||||
returns: 1
|
||||
returns: 0
|
||||
returns: 0
|
||||
|
||||
@@ -61,6 +61,10 @@ echo returns: $?
|
||||
[[ -z $UNSET ]]
|
||||
echo returns: $?
|
||||
|
||||
# need to handle test syntax errors and longjmp
|
||||
[[ -t X ]]
|
||||
echo returns: $?
|
||||
|
||||
# the ==/= and != operators do pattern matching
|
||||
[[ $TDIR == /usr/homes/* ]]
|
||||
echo returns: $?
|
||||
|
||||
Reference in New Issue
Block a user