mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Test setting readonly variables
This commit is contained in:
parent
8730b482a7
commit
1ab84ac62a
3 changed files with 13 additions and 0 deletions
|
@ -23,3 +23,7 @@ $argle bargle: invalid var name
|
|||
|
||||
####################
|
||||
# if/for/while scope
|
||||
|
||||
####################
|
||||
# readonly vars
|
||||
set: Tried to change the read-only variable 'status'
|
||||
|
|
|
@ -70,3 +70,9 @@ function test_ifforwhile_scope
|
|||
set --show ifvar1 ifvar2 ifvar3 whilevar1
|
||||
end
|
||||
test_ifforwhile_scope
|
||||
|
||||
# $status should always be read-only, setting it makes no sense because it's immediately overwritten.
|
||||
logmsg readonly vars
|
||||
set -g status 5
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -129,3 +129,6 @@ $whilevar1[1]: length=4 value=|val3|
|
|||
$whilevar1: not set in global scope
|
||||
$whilevar1: not set in universal scope
|
||||
|
||||
|
||||
####################
|
||||
# readonly vars
|
||||
|
|
Loading…
Reference in a new issue