summaryrefslogtreecommitdiffhomepage
path: root/tests/zash/trap-p.sh
blob: f32b2595173c3a2099dbe4402e6220a9eb724310 (plain)
1
2
3
4
5
6
# `trap -p` with operands prints those traps only, and prints nothing for a
# signal that has no trap.
"$TSH" -c 'trap "echo hi" USR1; trap "echo err" ERR; trap -p USR1 ERR INT'
echo "---"
"$TSH" -c 'trap -p USR2'
"$TSH" -c 'trap "echo a" USR1; trap "echo b" USR2; trap -p USR2'