diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/function.in | 14 | ||||
-rw-r--r-- | tests/function.out | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/function.in b/tests/function.in index e533b25b..747bbcec 100644 --- a/tests/function.in +++ b/tests/function.in @@ -30,3 +30,17 @@ set foo 'bad foo' set bar 'bad bar' set baz 'bad baz' frob + +# Test that -a does not mix up the function name with arguments +# See #2068 +function name1 -a arg1 arg2 ; end +function -a arg1 arg2 name2 ; end +function name3 --argument-names arg1 arg2 ; end +function --argument-names arg1 arg2 name4 ; end +for i in (seq 4) + if functions -q name$i + echo "Function name$i found" + else + echo "Function name$i not found, but should have been" + end +end diff --git a/tests/function.out b/tests/function.out index 3fa70990..5a3da619 100644 --- a/tests/function.out +++ b/tests/function.out @@ -18,3 +18,7 @@ $bar: (5) 4: '' 5: '3' $baz: (0) +Function name1 found +Function name2 found +Function name3 found +Function name4 found |