var_preserved.tests 186 B

12345678910111213141516
  1. export a=b
  2. # external program
  3. a=c /bin/true
  4. env | grep ^a=
  5. # builtin
  6. a=d true
  7. env | grep ^a=
  8. # exec with redirection only
  9. # in bash, this leaks!
  10. a=e exec 1>&1
  11. env | grep ^a=
  12. echo OK