diff options
-rw-r--r-- | shell/ash.c | 4 | ||||
-rw-r--r-- | shell/ash_test/ash-misc/for.right | 1 | ||||
-rwxr-xr-x | shell/ash_test/ash-misc/for.tests | 5 |
3 files changed, 8 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 17121aa9b..3339666b9 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -10913,7 +10913,7 @@ parse_command(void) | |||
10913 | n1 = stzalloc(sizeof(struct nfor)); | 10913 | n1 = stzalloc(sizeof(struct nfor)); |
10914 | n1->type = NFOR; | 10914 | n1->type = NFOR; |
10915 | n1->nfor.var = wordtext; | 10915 | n1->nfor.var = wordtext; |
10916 | checkkwd = CHKKWD | CHKALIAS; | 10916 | checkkwd = CHKNL | CHKKWD | CHKALIAS; |
10917 | if (readtoken() == TIN) { | 10917 | if (readtoken() == TIN) { |
10918 | app = ≈ | 10918 | app = ≈ |
10919 | while (readtoken() == TWORD) { | 10919 | while (readtoken() == TWORD) { |
@@ -10940,7 +10940,7 @@ parse_command(void) | |||
10940 | * Newline or semicolon here is optional (but note | 10940 | * Newline or semicolon here is optional (but note |
10941 | * that the original Bourne shell only allowed NL). | 10941 | * that the original Bourne shell only allowed NL). |
10942 | */ | 10942 | */ |
10943 | if (lasttoken != TNL && lasttoken != TSEMI) | 10943 | if (lasttoken != TSEMI) |
10944 | tokpushback = 1; | 10944 | tokpushback = 1; |
10945 | } | 10945 | } |
10946 | checkkwd = CHKNL | CHKKWD | CHKALIAS; | 10946 | checkkwd = CHKNL | CHKKWD | CHKALIAS; |
diff --git a/shell/ash_test/ash-misc/for.right b/shell/ash_test/ash-misc/for.right new file mode 100644 index 000000000..d86bac9de --- /dev/null +++ b/shell/ash_test/ash-misc/for.right | |||
@@ -0,0 +1 @@ | |||
OK | |||
diff --git a/shell/ash_test/ash-misc/for.tests b/shell/ash_test/ash-misc/for.tests new file mode 100755 index 000000000..4889a9f2d --- /dev/null +++ b/shell/ash_test/ash-misc/for.tests | |||
@@ -0,0 +1,5 @@ | |||
1 | for i | ||
2 | in OK | ||
3 | do | ||
4 | echo $i | ||
5 | done | ||