Bash-4.3 distribution sources and documentation
[platform/upstream/bash.git] / tests / errors.right
index ac987fb..63d6b7e 100644 (file)
@@ -8,19 +8,19 @@ unalias: usage: unalias [-a] name [name ...]
 declare -fr func
 ./errors.tests: line 36: func: readonly function
 ./errors.tests: line 39: unset: -x: invalid option
-unset: usage: unset [-f] [-v] [name ...]
+unset: usage: unset [-f] [-v] [-n] [name ...]
 ./errors.tests: line 42: unset: func: cannot unset: readonly function
 ./errors.tests: line 45: declare: func: readonly function
 ./errors.tests: line 49: unset: XPATH: cannot unset: readonly variable
 ./errors.tests: line 52: unset: `/bin/sh': not a valid identifier
 ./errors.tests: line 55: unset: cannot simultaneously unset a function and a variable
 ./errors.tests: line 58: declare: -z: invalid option
-declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
+declare: usage: declare [-aAfFgilnrtux] [-p] [name[=value] ...]
 ./errors.tests: line 60: declare: `-z': not a valid identifier
 ./errors.tests: line 61: declare: `/bin/sh': not a valid identifier
 ./errors.tests: line 65: declare: cannot use `-f' to make functions
 ./errors.tests: line 68: exec: -i: invalid option
-exec: usage: exec [-cl] [-a name] file [redirection ...]
+exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
 ./errors.tests: line 72: export: XPATH: not a function
 ./errors.tests: line 75: break: only meaningful in a `for', `while', or `until' loop
 ./errors.tests: line 76: continue: only meaningful in a `for', `while', or `until' loop
@@ -53,9 +53,10 @@ umask: usage: umask [-p] [-S] [mode]
 ./errors.tests: line 159: declare: VAR: readonly variable
 ./errors.tests: line 161: declare: unset: not found
 ./errors.tests: line 164: VAR: readonly variable
-./errors.tests: command substitution: line 168: syntax error: unexpected end of file
-./errors.tests: command substitution: line 168: syntax error near unexpected token `done'
-./errors.tests: command substitution: line 168: ` for z in 1 2 3; done '
+./errors.tests: command substitution: line 168: syntax error near unexpected token `)'
+./errors.tests: command substitution: line 168: ` for z in 1 2 3; do )'
+./errors.tests: command substitution: line 169: syntax error near unexpected token `done'
+./errors.tests: command substitution: line 169: ` for z in 1 2 3; done )'
 ./errors.tests: line 171: cd: HOME not set
 ./errors.tests: line 172: cd: /tmp/xyz.bash: No such file or directory
 ./errors.tests: line 174: cd: OLDPWD not set
@@ -68,7 +69,7 @@ source: usage: source filename [arguments]
 ./errors.tests: line 184: .: -i: invalid option
 .: usage: . filename [arguments]
 ./errors.tests: line 187: set: -q: invalid option
-set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
+set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
 ./errors.tests: line 190: enable: sh: not a shell builtin
 ./errors.tests: line 190: enable: bash: not a shell builtin
 ./errors.tests: line 193: shopt: cannot set and unset shell options simultaneously
@@ -76,7 +77,7 @@ set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
 ./errors.tests: line 199: read: `/bin/sh': not a valid identifier
 ./errors.tests: line 202: VAR: readonly variable
 ./errors.tests: line 205: readonly: -x: invalid option
-readonly: usage: readonly [-af] [name[=value] ...] or readonly -p
+readonly: usage: readonly [-aAf] [name[=value] ...] or readonly -p
 ./errors.tests: line 208: eval: -i: invalid option
 eval: usage: eval [arg ...]
 ./errors.tests: line 209: command: -i: invalid option
@@ -85,7 +86,7 @@ command: usage: command [-pVv] command [arg ...]
 ./errors.tests: line 213: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
 ./errors.tests: line 216: trap: NOSIG: invalid signal specification
 ./errors.tests: line 219: trap: -s: invalid option
-trap: usage: trap [-lp] [arg signal_spec ...]
+trap: usage: trap [-lp] [[arg] signal_spec ...]
 ./errors.tests: line 225: return: can only `return' from a function or sourced script
 ./errors.tests: line 229: break: 0: loop count out of range
 ./errors.tests: line 233: continue: 0: loop count out of range
@@ -97,4 +98,16 @@ trap: usage: trap [-lp] [arg signal_spec ...]
 ./errors.tests: line 250: kill: `': not a pid or valid job spec
 kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
 ./errors.tests: line 255: set: trackall: invalid option name
-./errors.tests: line 262: `!!': not a valid identifier
+./errors.tests: line 259: xx: readonly variable
+1
+./errors1.sub: line 1: .: -i: invalid option
+.: usage: . filename [arguments]
+./errors1.sub: line 9: shift: -4: shift count out of range
+./errors1.sub: line 14: break: -1: loop count out of range
+after f
+./errors2.sub: line 3: ${$NO_SUCH_VAR}: bad substitution
+1
+./errors3.sub: line 5: no_such_file: No such file or directory
+TEST
+./errors3.sub: line 7: no_such_file: No such file or directory
+./errors.tests: line 271: `!!': not a valid identifier