mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-05 23:18:08 +01:00
tests(export): ensure variable substitution in variable names works
This commit is contained in:
parent
45869f1154
commit
588b016f69
1 changed files with 18 additions and 0 deletions
18
test.sh
18
test.sh
|
|
@ -1078,4 +1078,22 @@ expecting <<EOF
|
|||
bon@jour
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue