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:
Khaïs COLIN 2025-04-16 17:36:51 +02:00
parent 733ae1093a
commit d53e40d3f4
2 changed files with 20 additions and 4 deletions

16
test.sh
View file

@ -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