mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
fix(subst/variable): invalid identifiers were having their $ swallowed
It is safe to delete this part: ```c if (!rep) return (NULL); ``` because rep is always returned, and no other code depends on that value
This commit is contained in:
parent
733ae1093a
commit
d53e40d3f4
2 changed files with 20 additions and 4 deletions
16
test.sh
16
test.sh
|
|
@ -658,4 +658,20 @@ expecting <<EOF
|
|||
hi
|
||||
EOF
|
||||
|
||||
when_run <<EOF "variable substitution with no valid name is not substitued"
|
||||
echo \$=
|
||||
echo \$:
|
||||
EOF
|
||||
expecting <<EOF
|
||||
$=
|
||||
$:
|
||||
EOF
|
||||
|
||||
when_run <<EOF "variable substitution with a lone dollar sign"
|
||||
echo " $ " | cat -e
|
||||
EOF
|
||||
expecting <<EOF
|
||||
$ $
|
||||
EOF
|
||||
|
||||
finalize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue