From 79231fad64f5755ea1b5cb1d1b123319e53fde02 Mon Sep 17 00:00:00 2001 From: Eric Levy Date: Mon, 24 Jan 2022 20:12:54 -0500 Subject: [PATCH] Add test that declarations are not dependent on inherited environment --- meta-tests.txt | 1 + meta-tests/subshell-clean.sh | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100755 meta-tests/subshell-clean.sh diff --git a/meta-tests.txt b/meta-tests.txt index 93888c6..3c8980c 100644 --- a/meta-tests.txt +++ b/meta-tests.txt @@ -2,6 +2,7 @@ base subshell-simple subshell-undeclared subshell-source +subshell-clean subshell-export subshell-declare function-list diff --git a/meta-tests/subshell-clean.sh b/meta-tests/subshell-clean.sh new file mode 100755 index 0000000..c8fa996 --- /dev/null +++ b/meta-tests/subshell-clean.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +source ./mo +cat <(moDeclare) - << "EOF" | env --ignore-environment bash +source ./run-basic-tests +if (( FAIL )); then + exit 1 +fi +EOF