Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--- /dev/null
+./assignment2.tests: line 2: a=b: not found
+127
--- /dev/null
+# This must not be interpreted as an assignment
+a''=b true
+echo $?
--- /dev/null
+Null 0th arg:
+./empty_args.tests: line 2: : Permission denied
+127
+Null 1st arg:
+0
+Null arg in exec:
--- /dev/null
+echo Null 0th arg:
+""
+echo $?
+echo Null 1st arg:
+# printf without args would print usage info
+printf ""
+echo $?
+echo Null arg in exec:
+exec printf ""
--- /dev/null
+var=val
+var=val
--- /dev/null
+var=old
+f() { echo "var=$var"; }
+# bash: POSIXLY_CORRECT behavior is to "leak" new variable values
+# out of function invocations (similar to "special builtins" behavior);
+# but in "bash mode", they don't leak.
+# hush does not "leak" values. ash does.
+var=val f
+echo "var=$var"
var=old
f() { echo "var=$var"; }
+# bash: POSIXLY_CORRECT behavior is to "leak" new variable values
+# out of function invocations (similar to "special builtins" behavior);
+# but in "bash mode", they don't leak.
+# hush does not "leak" values. ash does.
var=val f
echo "var=$var"