invert.tests 417 B

12345678910111213141516171819
  1. # tests of return value inversion
  2. # placeholder for future expansion
  3. # user subshells (...) did this wrong in bash versions before 2.04
  4. ! ( echo hello | grep h >/dev/null 2>&1 ); echo $?
  5. ! echo hello | grep h >/dev/null 2>&1 ; echo $?
  6. ! true ; echo $?
  7. ! false; echo $?
  8. ! (false) ; echo $?
  9. ! (true); echo $?
  10. ! true | false ; echo $?
  11. ! false | true ; echo $?
  12. ! (true | false) ; echo $?
  13. ! (false | true) ; echo $?