mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
test(builtin/export): ensure that variable substitution happens correctly
This commit is contained in:
parent
5fabec58d5
commit
1499eaa985
1 changed files with 13 additions and 0 deletions
13
test.sh
13
test.sh
|
|
@ -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
|
minishell: export: `--option-case=--no-preserve-root': not a valid identifier
|
||||||
EOF
|
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
|
finalize
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue