2017-08-04 05:01:56 +00:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Test the -V flag
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Testing -V
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Testing -V with changed variables
|
2018-11-28 14:27:21 +00:00
|
|
|
fish: function: Illegal function name '-a'
|
2017-03-26 12:38:59 +00:00
|
|
|
function -a arg1 arg2 name2 ; end
|
|
|
|
^
|
2018-11-28 14:27:21 +00:00
|
|
|
fish: function: Illegal function name '--argument-names'
|
2017-03-26 12:38:59 +00:00
|
|
|
function --argument-names arg1 arg2 name4 ; end
|
|
|
|
^
|
2018-11-28 14:27:21 +00:00
|
|
|
fish: function: Unexpected positional argument 'abc'
|
2017-03-26 12:38:59 +00:00
|
|
|
function name5 abc --argument-names def ; end
|
|
|
|
^
|
2017-08-04 05:01:56 +00:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Verify that functions can be copied. Tests against regression of issue #3601
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Checking that the copied functions are identical other than the name
|
2018-02-25 18:25:29 +00:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Checking reserved names
|
2018-11-28 14:27:21 +00:00
|
|
|
fish: function: The name 'test' is reserved,
|
2018-02-25 18:25:29 +00:00
|
|
|
and can not be used as a function name
|
|
|
|
function test; echo banana; end
|
|
|
|
^
|