mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-13 16:37:34 +00:00
1c4223889b
GNU sort behaves stupidly when LC_ALL is not C. This caused the test output to be sorted wrong.
45 lines
1.1 KiB
Text
Executable file
45 lines
1.1 KiB
Text
Executable file
|
|
# Test that conditions that add or remove completions don't deadlock, etc.
|
|
# 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'
|
|
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
|
|
|
|
function sort
|
|
# GNU sort is really stupid, a non-C locale seems to make it assume --dictionary-order
|
|
# If I wanted --dictionary-order, I would have specified --dictionary-order!
|
|
env LC_ALL=C sort $argv
|
|
end
|
|
|
|
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
|