xref: /freebsd/bin/sh/tests/builtins/trap5.0 (revision 2008043f386721d58158e37e0d7e50df8095942d)
1
2set -e
3trap - USR1
4initial=$(trap)
5trap -- -l USR1
6added=$(trap)
7[ -n "$added" ]
8trap - USR1
9second=$(trap)
10[ "$initial" = "$second" ]
11eval "$added"
12added2=$(trap)
13added3=$(trap --)
14[ "$added" = "$added2" ]
15[ "$added2" = "$added3" ]
16trap -- - USR1
17third=$(trap)
18[ "$initial" = "$third" ]
19