Skip to content

Commit

Permalink
[spec/builtin-vars] Failing test case for unset / bug #653.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Chu committed Apr 14, 2020
1 parent e401363 commit a5f679d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec/builtin-vars.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,27 @@ foo=bar
foo=
## END

#### Unset and scope (bug #653)
unlocal() { unset "$@"; }
check4() {
hello=global

local hello=local
echo hello=$hello

unlocal hello
echo hello=$hello
}
check4
## STDOUT:
hello=local
hello=global
## END
## OK dash/ash/zsh/osh STDOUT:
hello=local
hello=
## END

#### Unset invalid variable name
unset %
echo status=$?
Expand Down

0 comments on commit a5f679d

Please sign in to comment.