mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Add tests for the various complete -e
changes
This commit is contained in:
parent
2820c7a9cd
commit
90a4fd34d2
2 changed files with 59 additions and 3 deletions
|
@ -3,9 +3,37 @@
|
|||
# We actually encountered some case that was effectively like this (Issue 2 in github)
|
||||
|
||||
complete --command AAAA -l abcd --condition 'complete -c AAAA -l efgh'
|
||||
complete -C'AAAA -'
|
||||
complete -C'AAAA -'
|
||||
echo "AAAA:"
|
||||
complete -C'AAAA -' | sort
|
||||
echo "AAAA:"
|
||||
complete -C'AAAA -' | sort
|
||||
|
||||
complete --command BBBB -l abcd --condition 'complete -e --command BBBB -l abcd'
|
||||
echo "BBBB:"
|
||||
complete -C'BBBB -'
|
||||
echo "BBBB:"
|
||||
complete -C'BBBB -'
|
||||
|
||||
# Test that erasing completions works correctly
|
||||
echo
|
||||
|
||||
complete -c CCCC -l bar
|
||||
complete -c CCCC -l baz
|
||||
complete -c CCCC -o bar
|
||||
complete -c CCCC -o foo
|
||||
complete -c CCCC -s a
|
||||
complete -c CCCC -s b
|
||||
echo "CCCC:"
|
||||
complete -C'CCCC -' | sort
|
||||
complete -c CCCC -l bar -e
|
||||
echo "CCCC:"
|
||||
complete -C'CCCC -' | sort
|
||||
complete -c CCCC -o foo -e
|
||||
echo "CCCC:"
|
||||
complete -C'CCCC -' | sort
|
||||
complete -c CCCC -s a -e
|
||||
echo "CCCC:"
|
||||
complete -C'CCCC -' | sort
|
||||
complete -c CCCC -e
|
||||
echo "CCCC:"
|
||||
complete -C'CCCC -' | sort
|
||||
|
|
|
@ -1,4 +1,32 @@
|
|||
AAAA:
|
||||
--abcd
|
||||
AAAA:
|
||||
--abcd
|
||||
--efgh
|
||||
BBBB:
|
||||
--abcd
|
||||
--abcd
|
||||
BBBB:
|
||||
|
||||
CCCC:
|
||||
--bar
|
||||
--baz
|
||||
-a
|
||||
-b
|
||||
-bar
|
||||
-foo
|
||||
CCCC:
|
||||
--baz
|
||||
-a
|
||||
-b
|
||||
-bar
|
||||
-foo
|
||||
CCCC:
|
||||
--baz
|
||||
-a
|
||||
-b
|
||||
-bar
|
||||
CCCC:
|
||||
--baz
|
||||
-b
|
||||
-bar
|
||||
CCCC:
|
||||
|
|
Loading…
Reference in a new issue