mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 18:52:35 +02:00
fix recogniation of IN token in for command nested within case command
This commit is contained in:
@@ -15,3 +15,6 @@ bash5: -c: line 1: `for()'
|
||||
in
|
||||
done
|
||||
ok 1
|
||||
x
|
||||
x
|
||||
x
|
||||
|
||||
@@ -63,4 +63,39 @@ in
|
||||
foo) echo "ok 1";;
|
||||
esac' $bashname
|
||||
|
||||
# POSIX grammar rule 6 with <linebreak> consisting of multiple newlines and
|
||||
# nested case and for commands
|
||||
|
||||
case x in x)
|
||||
for x
|
||||
in x
|
||||
do
|
||||
echo $x
|
||||
done
|
||||
esac
|
||||
|
||||
# need to recognize IN here
|
||||
case x in x)
|
||||
for x
|
||||
|
||||
|
||||
in x
|
||||
do
|
||||
echo $x
|
||||
done
|
||||
esac
|
||||
|
||||
# recognize both IN and DO
|
||||
case x in x)
|
||||
for x
|
||||
|
||||
|
||||
in x
|
||||
|
||||
|
||||
|
||||
do
|
||||
echo $x
|
||||
done
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user