mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
tests(export): ensure export rejects invalid identifiers
This commit is contained in:
parent
c4be8693d1
commit
c756d3783f
1 changed files with 7 additions and 6 deletions
13
test.sh
13
test.sh
|
|
@ -759,15 +759,16 @@ minishell: export: `': not a valid identifier
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
when_run <<EOF "export with invalid identifiers"
|
when_run <<EOF "export with invalid identifiers"
|
||||||
export % $ 0 1 \$?
|
export T%=T T$=T 0=T 1=T \$?=T TE+S=T
|
||||||
echo \$?
|
echo \$?
|
||||||
EOF
|
EOF
|
||||||
expecting <<"EOF"
|
expecting <<"EOF"
|
||||||
minishell: export: `%': not a valid identifier
|
minishell: export: `T%=T': not a valid identifier
|
||||||
minishell: export: `$': not a valid identifier
|
minishell: export: `T$=T': not a valid identifier
|
||||||
minishell: export: `0': not a valid identifier
|
minishell: export: `0=T': not a valid identifier
|
||||||
minishell: export: `1': not a valid identifier
|
minishell: export: `1=T': not a valid identifier
|
||||||
minishell: export: `0': not a valid identifier
|
minishell: export: `0=T': not a valid identifier
|
||||||
|
minishell: export: `TE+S=T': not a valid identifier
|
||||||
1
|
1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue