test(builtin/export): ensure that variable substitution happens correctly

This commit is contained in:
Khaïs COLIN 2025-04-18 10:33:37 +02:00
parent 5fabec58d5
commit 1499eaa985

13
test.sh
View file

@ -795,4 +795,17 @@ minishell: export: `lisp-case=(defun botsbuildbots () (botsbuildbots))': not a v
minishell: export: `--option-case=--no-preserve-root': not a valid identifier
EOF
when_run <<"EOF" "export with variable substitution in arguments"
export type=nuclear phrase="the $type option"
echo $phrase
export phrase="the $type option" $type="the $type option"
echo $phrase
echo $nuclear
EOF
expecting <<EOF
the option
the nuclear option
the nuclear option
EOF
finalize