ash: handle "A=1 A=2 B=$A; echo $B". closes bug 947.

This commit is contained in:
Denis Vlasenko
2008-02-15 15:02:15 +00:00
parent 977bc6a137
commit 0e6f661e23
6 changed files with 96 additions and 39 deletions

View File

@@ -0,0 +1,6 @@
a=a A=a
a=a A=a
a= A=
a= A=
a=a A=a
a=a A=a

View File

@@ -0,0 +1,14 @@
# check that first assignment has proper effect on second one
(
a=a A=$a
echo a=$a A=$A
)
(a=a A=$a; echo a=$a A=$A)
(a=a A=$a echo a=$a A=$A)
(a=a A=$a /bin/echo a=$a A=$A)
f() { echo a=$a A=$A; }
(a=a A=$a f)
(a=a A=$a; f)

View File

@@ -0,0 +1 @@
bus/usb/1/2

View File

@@ -0,0 +1 @@
X=usbdev1.2 X=${X#usbdev} B=${X%%.*} D=${X#*.}; echo bus/usb/$B/$D