From 5e04b21a7059811eed197f360a02971fea38d751 Mon Sep 17 00:00:00 2001 From: Eric Levy Date: Mon, 24 Jan 2022 22:13:47 -0500 Subject: [PATCH] Add test that declarations may be propagated to descedant shells --- meta-tests.txt | 1 + meta-tests/subshell-declare-nested.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 meta-tests/subshell-declare-nested.sh diff --git a/meta-tests.txt b/meta-tests.txt index b7f378f..7a48ab0 100644 --- a/meta-tests.txt +++ b/meta-tests.txt @@ -9,6 +9,7 @@ subshell-export-nested subshell-unexport subshell-unexport-nested subshell-declare +subshell-declare-nested function-list function-unload function-export diff --git a/meta-tests/subshell-declare-nested.sh b/meta-tests/subshell-declare-nested.sh new file mode 100755 index 0000000..5b385a9 --- /dev/null +++ b/meta-tests/subshell-declare-nested.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +source ./mo +cat <(moDeclare) - << "EOF" | bash +cat <(moDeclare) - << "EOF2" | bash +cat <(moDeclare) - << "EOF3" | bash +cat <(moDeclare) - << "EOF4" | bash +source ./run-basic-tests +if (( FAIL )); then + exit 1 +fi +EOF4 +EOF3 +EOF2 +EOF