mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-13 11:21:13 +02:00
unposted: Add compset tests related to workers/44275
(Provided off-list by Oliver)
This commit is contained in:
parent
c1a33575b4
commit
ffacb17886
2 changed files with 41 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
|||
2019-05-08 dana <dana@dana.is>
|
||||
|
||||
* Oliver Kiddle: unposted: Test/Y01completion.ztst: Add compset tests
|
||||
related to workers/44275
|
||||
|
||||
* 44275: Doc/Zsh/compwid.yo, Src/Zle/complete.c: Fix compset -p/-s
|
||||
multibyte inconsistency and documentation
|
||||
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
# Tests for completion system.
|
||||
|
||||
%prep
|
||||
unset -m LC_\*
|
||||
ZSH_TEST_LANG=
|
||||
langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
|
||||
$(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
|
||||
for LANG in $langs; do
|
||||
if [[ ?? = ? ]]; then
|
||||
ZSH_TEST_LANG=$LANG
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [[ $OSTYPE = cygwin ]]; then
|
||||
ZTST_unimplemented="the zsh/zpty module does not work on Cygwin"
|
||||
elif ( zmodload zsh/zpty 2>/dev/null ); then
|
||||
|
@ -107,6 +117,34 @@ F:regression test workers/31611
|
|||
>line: {cd "A(B)/C/}{}
|
||||
>line: {cd ../C/}{}
|
||||
|
||||
comptesteval '_tst() { compset -p 1; _message "${(qq)IPREFIX} ${(qq)PREFIX}" }'
|
||||
comptest $'tst .\t'
|
||||
0:remove exact number of characters from a prefix
|
||||
>line: {tst .}{}
|
||||
>MESSAGE:{'.' ''}
|
||||
|
||||
comptesteval '_tst() { compset -s 3; _message "${(qq)SUFFIX} ${(qq)ISUFFIX}" }'
|
||||
comptest $'tst 123\eb\t'
|
||||
0:remove exact number of characters from a suffix
|
||||
>line: {tst }{123}
|
||||
>MESSAGE:{'' '123'}
|
||||
|
||||
comptesteval '_tst() { compset -p 2; compset -p 3;compset -s 2;compset -s 3; _message "${(qq)PREFIX} ${(qq)SUFFIX}" }'
|
||||
comptest $'tst 12345678\e4\C-b\t'
|
||||
0:try to remove excess characters from prefix and suffix
|
||||
>line: {tst 1234}{5678}
|
||||
>MESSAGE:{'34' '56'}
|
||||
|
||||
if [[ -z $ZSH_TEST_LANG ]]; then
|
||||
ZTST_skip="no UTF-8 locale for multibyte completion test"
|
||||
else
|
||||
comptesteval '_tst() { compset -p 1; _message "${(qq)IPREFIX} ${(qq)PREFIX}" }'
|
||||
comptest $'tst ???100\t'
|
||||
fi
|
||||
0:remove multibyte character from a prefix
|
||||
>line: {tst ???100}{}
|
||||
>MESSAGE:{'???' '100'}
|
||||
|
||||
comptesteval "_tst() { compadd -U -s : -S / -I . word; compstate[to_end]= }"
|
||||
comptest $'tst .\C-b\t'
|
||||
0:allow for suffixes when moving cursor to end of match (with ignored suffix)
|
||||
|
|
Loading…
Reference in a new issue