Skip to content

Commit

Permalink
tests: add test for invalid variable name in for loop
Browse files Browse the repository at this point in the history
Work on #5800.
  • Loading branch information
zanchey committed Apr 9, 2019
1 parent c6c0c9b commit d6a4694
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test3.err
@@ -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
^
4 changes: 4 additions & 0 deletions tests/test3.in
Expand Up @@ -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
3 changes: 3 additions & 0 deletions tests/test3.out
Expand Up @@ -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

0 comments on commit d6a4694

Please sign in to comment.