nofork_env.tests 367 B

123456789101112131415
  1. # ash had a bug where NOFORKed applet (env/printenv) was not seeing new exported variables
  2. (export ZVAR=1; printenv) | grep ^ZVAR=
  3. (ZVAR=2 printenv) | grep ^ZVAR=
  4. (export ZVAR=3; env) | grep ^ZVAR=
  5. (ZVAR=4 env) | grep ^ZVAR=
  6. export ZVAR=5; printenv | grep ^ZVAR=
  7. ZVAR=6 printenv | grep ^ZVAR=
  8. export ZVAR=7; env | grep ^ZVAR=
  9. ZVAR=8 env | grep ^ZVAR=
  10. echo Ok:$?