From 3be121a05dcd170854a8dac6437b29f297a6ff4e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:01:11 +0200 Subject: Adding upstream version 2.23.4+deb12u1. Signed-off-by: Daniel Baumann --- test/bashisms/traps.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/bashisms/traps.sh (limited to 'test/bashisms/traps.sh') diff --git a/test/bashisms/traps.sh b/test/bashisms/traps.sh new file mode 100644 index 0000000..b357ce7 --- /dev/null +++ b/test/bashisms/traps.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +trap foo ERR # BASHISM +trap foo RETURN # BASHISM +trap foo DEBUG # BASHISM + +trap "echo BASHISM" ERR +trap "echo BASHISM" RETURN +trap "echo BASHISM" DEBUG + +foo() { + echo ": dummy function" +} + +trap $(foo BASHISM) ERR +trap "$(foo BASHISM)" RETURN +trap "echo $foo BASHISM" DEBUG -- cgit v1.2.3