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/heredocs.sh | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 test/bashisms/heredocs.sh (limited to 'test/bashisms/heredocs.sh') diff --git a/test/bashisms/heredocs.sh b/test/bashisms/heredocs.sh new file mode 100644 index 0000000..39dd076 --- /dev/null +++ b/test/bashisms/heredocs.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +cat <<- FOO + foo + bar + moo +FOO + +echo -e moo # BASHISM + +foo() { + cat <<- FOO + foo + bar + moo + FOO + echo -e BASHISM +} + +bar() { + cat <<- FOO + foo + bar + moo + FOO + echo -e nothing wrong here +FOO + echo -e BASHISM +} + + +moo() { + cat << FOO + foo + bar + moo + FOO + echo -e nothing wrong here + FOO + echo -e still nothing wrong here +FOO + echo -e BASHISM +} + +baz() { + cat << EOF1 +EOF1 + echo -e still inside the here doc +EOF1 ; echo -e still inside... +EOF1 + echo -e BASHISM +} -- cgit v1.2.3