test "$(trap 'printf trap; echo ped' EXIT; f() { :; }; f)" = trapped || exit 1