tests: add test for invalid variable name in for loop

Work on #5800.
This commit is contained in:
David Adam 2019-04-09 20:10:51 +08:00
parent c6c0c9bfdf
commit d6a4694d9f
3 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,10 @@
####################
# Path universal variables
####################
# Variable names in other commands
fish: for: Variable name 'a,b' is not valid. See `help identifiers`.
for a,b in y 1 z 3; echo $a,$b; end
^

View file

@ -326,4 +326,8 @@ echo "$__fish_test_PATH" $__fish_test_PATH
set -U --path __fish_test_path2 a:b
echo "$__fish_test_path2" $__fish_test_path2
logmsg Variable names in other commands
# Test invalid variable names in loops (#5800)
for a,b in y 1 z 3; echo $a,$b; end
true

View file

@ -55,3 +55,6 @@ a:b:c 1 2 3 a b c 1 2 3
a:b:c 1:2:3 a b c 1 2 3
1:2:3 1 2 3
a:b a b
####################
# Variable names in other commands