1 # builtins with exit status inverted
13 # inverting shouldn't affect exit
20 # commands requiring an exec with exit status inverted -- broken in bash-2.04
22 ( ls > /dev/null 2>&1 )
24 ( ! ls > /dev/null 2>&1 )
28 chmod 400 /tmp/notwrite
30 # make sure redirection failures in commands whose exit status is inverted
31 # are handled correctly
33 ( ls > /tmp/notwrite ) 2>/dev/null
36 ( ! ls > /tmp/notwrite ) 2>/dev/null
39 # now add exit traps, true and false for commands with and without exit
42 (trap 'false' 0 ; ! ls > /tmp/notwrite ) 2>/dev/null
45 (trap 'false' 0 ; ls > /tmp/notwrite ) 2>/dev/null
48 (trap 'true' 0 ; ! ls > /tmp/notwrite ) 2>/dev/null
51 (trap 'true' 0 ; ls > /tmp/notwrite ) 2>/dev/null