trap5.0 revision 259210
1# $FreeBSD: head/bin/sh/tests/builtins/trap5.0 217461 2011-01-15 21:09:00Z jilles $ 2 3set -e 4trap - USR1 5initial=$(trap) 6trap -- -l USR1 7added=$(trap) 8[ -n "$added" ] 9trap - USR1 10second=$(trap) 11[ "$initial" = "$second" ] 12eval "$added" 13added2=$(trap) 14added3=$(trap --) 15[ "$added" = "$added2" ] 16[ "$added2" = "$added3" ] 17trap -- - USR1 18third=$(trap) 19[ "$initial" = "$third" ] 20