diff --git a/test/lib/library.exp b/test/lib/library.exp index 75bf921c..4ec0e697 100644 --- a/test/lib/library.exp +++ b/test/lib/library.exp @@ -846,7 +846,7 @@ proc save_env {{file ""}} { # @param string File to save the environment to. Default is "$TESTDIR/tmp/env1~". # @see assert_env_unmodified() proc _save_env {{file ""}} { - assert_bash_exec "{ set; declare -F; shopt -p; } > \"$file\"" + assert_bash_exec "{ (set -o posix ; set); declare -F; shopt -p; } > \"$file\"" }