mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
Test setting readonly variables
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user