3
0

unset.tests 424 B

123456789101112131415161718192021222324252627282930313233343536
  1. # check invalid options are rejected
  2. unset -
  3. echo $?
  4. unset -m a b c
  5. echo $?
  6. # check funky usage
  7. unset
  8. echo $?
  9. # check normal usage
  10. echo ___
  11. f=f g=g
  12. echo $? $f $g
  13. unset f
  14. echo $? $f $g
  15. unset g
  16. echo $? $f $g
  17. echo ___
  18. f=f g=g
  19. echo $? $f $g
  20. unset f g
  21. echo $? $f $g
  22. f=f g=g
  23. echo $? $f $g
  24. unset -v f g
  25. echo $? $f $g
  26. # check read only vars
  27. echo ___
  28. f=f g=g
  29. unset HUSH_VERSION
  30. echo $? $f $g
  31. unset f HUSH_VERSION g
  32. echo $? $f $g