tests: Migrate legacy test 69.

This commit is contained in:
Lucas Hoffmann
2015-07-09 15:38:56 +02:00
parent 176f223ea3
commit 622a3ae8ea
4 changed files with 339 additions and 358 deletions

View File

@@ -28,7 +28,6 @@ SCRIPTS := \
test53.out \
test55.out \
test64.out \
test69.out \
test73.out \
test79.out \
test_listlbr.out \

View File

@@ -1,191 +0,0 @@
Test for multi-byte text formatting.
Also test, that 'mps' with multibyte chars works.
And test "ra" on multi-byte characters.
Also test byteidx() and byteidxcomp()
STARTTEST
:
ENDTEST
Results of test69:
STARTTEST
/^{/+1
:set tw=2 fo=t
gqgqjgqgqo
abc 
ENDTEST
{
abc
}
STARTTEST
/^{/+1
:set tw=1 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqo
a
a

ENDTEST
{
a
a
}
STARTTEST
/^{/+1
:set tw=2 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
a
a
a
ab
abc
ab c
ab
ENDTEST
{
a
a
a
ab
abc
ab c
ab
}
STARTTEST
/^{/+1
:set ai tw=2 fo=tm
gqgqjgqgqo
a
ENDTEST
{
a
}
STARTTEST
/^{/+1
:set noai tw=2 fo=tm
gqgqjgqgqo
a
ENDTEST
{
a
}
STARTTEST
/^{/+1
:set tw=2 fo=cqm comments=n:
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
a
a
a

ENDTEST
{
a
a
a
}
STARTTEST
/^{/+1
:set tw=2 fo=tm
Ra
ENDTEST
{
}
STARTTEST
/^{/+1
:set mps+=u2018:u2019
d%
ENDTEST
{
two three four
}
STARTTEST
/^ra test
jVjra
ENDTEST
ra test
bb
b
STARTTEST
:set whichwrap+=h
/^x
dh
:set whichwrap-=h
ENDTEST
á
x
STARTTEST
:let a = '.é.' " one char of two bytes
:let b = '.é.' " normal e with composing char
/^byteidx
:put =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)])
:put =string([byteidx(b, 0), byteidx(b, 1), byteidx(b, 2), byteidx(b, 3), byteidx(b, 4)])
/^byteidxcomp
:put =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)])
:let b = '.é.'
:put =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)])
ENDTEST
byteidx
byteidxcomp
STARTTEST
/^substitute
:let y = substitute('', '\zs', 'a', 'g') | put =y
ENDTEST
substitute
STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out
ENDTEST

View File

@@ -1,166 +0,0 @@
Results of test69:
{
abc
abc
}
{
a
a
a
a
}
{
a
a
a
ab
abc
ab
c
ab
a
a
a
ab
abc
ab
c
ab
}
{
a
a
}
{
a
a
}
{
a
a
a
a
a
a
}
{
a
}
{
four
}
ra test
aaaa
aaa
áx
byteidx
[0, 1, 3, 4, -1]
[0, 1, 4, 5, -1]
byteidxcomp
[0, 1, 3, 4, -1]
[0, 1, 2, 4, 5, -1]
substitute
aaaa