Blame SOURCES/ksh-20120801-parserfix.patch

0c842d
--- ksh_20120801/src/cmd/ksh93/sh/lex.c	2012-06-12 21:05:18.000000000 +0200
0c842d
+++ ksh_20120801/src/cmd/ksh93/sh/lex.c	2015-08-18 17:42:06.138076565 +0200
0c842d
@@ -1603,7 +1603,14 @@ static int comsub(register Lex_t *lp, in
0c842d
 				if(n==4)
0c842d
 					break;
0c842d
 				if(sh_lexstates[ST_NAME][c])
0c842d
+				{
0c842d
+					if(c==' ' || c=='\t')
0c842d
+					{
0c842d
+						n = 0;
0c842d
+						continue;
0c842d
+					}
0c842d
 					goto skip;
0c842d
+				}
0c842d
 				word[n++] = c;
0c842d
 			}
0c842d
 			if(sh_lexstates[ST_NAME][c]==S_BREAK)
0c842d
--- ksh_20120801/src/cmd/ksh93/tests/subshell.sh	2012-07-25 23:40:29.000000000 +0200
0c842d
+++ ksh_20120801/src/cmd/ksh93/tests/subshell.sh	2015-08-18 17:42:06.143076553 +0200
0c842d
@@ -617,4 +617,6 @@ do	if	[[ -e $f ]]
0c842d
 	fi
0c842d
 done
0c842d
 
0c842d
+$SHELL > /dev/null -c 'echo $(for x in whatever; do case y in *) true;; esac; done)' || err_exit 'syntax error with case in command substitution'
0c842d
+
0c842d
 exit $((Errors<125?Errors:125))