… one more regression test we pass…

• hd <<< bar
  → like bash, ksh93, zsh
• hd <<< #bar
  → like zsh (bash, ksh93: syntax error)
• hd <<<
  → like hd <<< '' (bash, ksh93, zsh: syntax error)
This commit is contained in:
tg 2008-07-09 20:41:23 +00:00
parent f4790e8773
commit 943446cadf
1 changed files with 5 additions and 1 deletions

6
lex.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.63 2008/07/08 22:28:25 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.64 2008/07/09 20:41:23 tg Exp $");
/*
* states while lexing word
@ -192,6 +192,10 @@ yylex(int cf)
c = getsc();
if (c == '<') {
state = SHERESTRING;
while ((c = getsc()) == ' ' || c == '\t')
;
ungetsc(c);
c = '<';
goto accept_nonword;
}
ungetsc(c);