Merge nucleic/sleek-thistle-egret-fyej into dev
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
name: "Builtins: local"
|
||||
cases:
|
||||
- name: "Basic local usage"
|
||||
stdin: |
|
||||
myfunc() {
|
||||
local x=10
|
||||
echo "in myfunc: x==$x"
|
||||
}
|
||||
x=5
|
||||
echo "before call: x==$x"
|
||||
myfunc
|
||||
echo "after call: x==$x"
|
||||
|
||||
- name: "Local with empty array"
|
||||
stdin: |
|
||||
myfunc() {
|
||||
local x=()
|
||||
declare -p x
|
||||
echo "x[0]: ${x[0]}"
|
||||
}
|
||||
myfunc
|
||||
Reference in New Issue
Block a user