tests(export): ensure variable substitution in variable names works

This commit is contained in:
Khaïs COLIN 2025-04-25 13:39:35 +02:00
parent 45869f1154
commit 588b016f69

18
test.sh
View file

@ -1078,4 +1078,22 @@ expecting <<EOF
bon@jour bon@jour
EOF EOF
when_run <<"EOF" "variable substitution in export variable name"
export VAR=answer
export the_$VAR=42
echo the answer is $the_answer
EOF
expecting <<EOF
the answer is 42
EOF
when_run <<"EOF" "variable substitution in export variable name"
export VAR=answer
export $VAR=42
echo the answer is $answer
EOF
expecting <<EOF
the answer is 42
EOF
finalize finalize