hush: add var4.tests, var5.tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
61508d9624
commit
db7f4c203b
1
shell/hush_test/hush-vars/var4.right
Normal file
1
shell/hush_test/hush-vars/var4.right
Normal file
@ -0,0 +1 @@
|
||||
bus/usb/1/2
|
1
shell/hush_test/hush-vars/var4.tests
Executable file
1
shell/hush_test/hush-vars/var4.tests
Executable file
@ -0,0 +1 @@
|
||||
X=usbdev1.2 X=${X#usbdev} B=${X%%.*} D=${X#*.}; echo bus/usb/$B/$D
|
6
shell/hush_test/hush-vars/var5.right
Normal file
6
shell/hush_test/hush-vars/var5.right
Normal 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
|
14
shell/hush_test/hush-vars/var5.tests
Executable file
14
shell/hush_test/hush-vars/var5.tests
Executable 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)
|
Loading…
Reference in New Issue
Block a user