sh testsuite: sync ash-vars/ and hush-vars/

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2016-10-02 18:17:15 +02:00
parent e3354bc44a
commit 0ba99705a1
11 changed files with 39 additions and 20 deletions

View File

@ -1,6 +1,4 @@
a=a A=a http://busybox.net
a=a A=a http://busybox.net_abc
a= A= 1 1
a= A= 1 1
a=a A=a
a=a A=a

View File

@ -1,14 +1,9 @@
# check that first assignment has proper effect on second one URL=http://busybox.net
( echo $URL
a=a A=$a echo ${URL}_abc
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; } true
false; echo $? ${?}
(a=a A=$a f) true
(a=a A=$a; f) { false; echo $? ${?}; }

View File

@ -1 +1,2 @@
bus/usb/1/2 http://busybox.net
http://busybox.net_abc

View File

@ -1 +1,4 @@
X=usbdev1.2 X=${X#usbdev} B=${X%%.*} D=${X#*.}; echo bus/usb/$B/$D _1=http://busybox.net
echo $_1
echo ${_1}_abc

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

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)