diff --git a/test.sh b/test.sh index 70bf468..7a12d78 100755 --- a/test.sh +++ b/test.sh @@ -1473,4 +1473,90 @@ minishell: $VAR: ambiguous redirect minishell: $VAR: ambiguous redirect EOF +when_run <<"EOF" "here-documents limiter is not expanded" +export LIM=hello +cat << $LIM +hi +hello +goodbye +$LIM +<< $LIM +EOF +expecting <<"EOF" +hi +hello +goodbye +minishell: warning: here-document delimited by end-of-file (wanted `$LIM') +EOF + +when_run < bonjour +echo hello +cat bonjour +EOF +expecting <<"EOF" +minishell: warning: here-document delimited by end-of-file (wanted `eof') +EOF + +when_run < bonjour +hello +there +eof +cat bonjour +EOF +expecting <<"EOF" +hello +there +EOF + +when_run <