3
0

exitcode2.tests 231 B

123456789101112
  1. # syntax error should return status 2
  2. cat >test.sh <<EOF
  3. )
  4. EOF
  5. chmod +x test.sh
  6. $THIS_SH ./test.sh
  7. echo Done:$?
  8. rm -f test.sh
  9. # redirection error with special builtin should return status 1
  10. (eval cat <does_not_exist)
  11. echo Done:$?