forked from aniani/vim
patch 8.0.0014
Problem: Crypt tests are old style. Solution: Convert to new style.
This commit is contained in:
@@ -2048,7 +2048,7 @@ test1 \
|
|||||||
test40 test41 test42 test43 test44 test45 test48 test49 \
|
test40 test41 test42 test43 test44 test45 test48 test49 \
|
||||||
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
|
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
|
||||||
test60 test64 test65 test66 test67 test68 test69 \
|
test60 test64 test65 test66 test67 test68 test69 \
|
||||||
test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
|
test70 test72 test73 test74 test75 test76 test77 test78 test79 \
|
||||||
test80 test82 test83 test84 test85 test86 test87 test88 test89 \
|
test80 test82 test83 test84 test85 test86 test87 test88 test89 \
|
||||||
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
|
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
|
||||||
test100 test101 test103 test104 test107 test108:
|
test100 test101 test103 test104 test107 test108:
|
||||||
|
@@ -53,7 +53,6 @@ SCRIPTS_ALL = \
|
|||||||
test68.out \
|
test68.out \
|
||||||
test69.out \
|
test69.out \
|
||||||
test70.out \
|
test70.out \
|
||||||
test71.out \
|
|
||||||
test73.out \
|
test73.out \
|
||||||
test75.out \
|
test75.out \
|
||||||
test76.out \
|
test76.out \
|
||||||
|
@@ -1,94 +0,0 @@
|
|||||||
Test for encryption.
|
|
||||||
The test data is in another file to avoid problems with 'encoding', especially
|
|
||||||
cp932.
|
|
||||||
|
|
||||||
STARTTEST
|
|
||||||
:so small.vim
|
|
||||||
:set enc=latin1
|
|
||||||
:bwipe!
|
|
||||||
:r test71a.in
|
|
||||||
:/^start of text/+1
|
|
||||||
:let text_lines = getline('.', line('.') + 2)
|
|
||||||
:/^start of cm=zip bytes/+1
|
|
||||||
:let cm0_bytes = getline('.', '.')
|
|
||||||
:/^start of cm=blowfish bytes/+1
|
|
||||||
:let cm1_bytes = getline('.', '.')
|
|
||||||
:/^start of cm=blowfish2 bytes/+1
|
|
||||||
:let cm2_bytes = getline('.', '.')
|
|
||||||
:bwipe!
|
|
||||||
:call append(0, text_lines)
|
|
||||||
:$d
|
|
||||||
:X
|
|
||||||
foobar
|
|
||||||
foobar
|
|
||||||
:w! Xtestfile
|
|
||||||
:bwipe!
|
|
||||||
:e Xtestfile
|
|
||||||
foobar
|
|
||||||
:let cm0_read_back = getline('.', '$')
|
|
||||||
:set key=
|
|
||||||
:set cryptmethod=blowfish
|
|
||||||
:" If the blowfish test fails 'cryptmethod' will be 'zip' now.
|
|
||||||
:%s/^/\=&cryptmethod == 'blowfish' ? "OK " : "blowfish test failed "/
|
|
||||||
:X
|
|
||||||
barfoo
|
|
||||||
barfoo
|
|
||||||
:w! Xtestfile
|
|
||||||
:bwipe!
|
|
||||||
:e Xtestfile
|
|
||||||
barfoo
|
|
||||||
:let cm1_read_back = getline('.', '$')
|
|
||||||
:set key=
|
|
||||||
:set cryptmethod=blowfish2
|
|
||||||
:" If the blowfish test fails 'cryptmethod' will be 'zip' now.
|
|
||||||
:%s/^/\=&cryptmethod == 'blowfish2' ? "OK " : "blowfish test failed "/
|
|
||||||
:X
|
|
||||||
bar2foo
|
|
||||||
bar2foo
|
|
||||||
:w! Xtestfile
|
|
||||||
:bwipe!
|
|
||||||
:e Xtestfile
|
|
||||||
bar2foo
|
|
||||||
:let cm2_read_back = getline('.', '$')
|
|
||||||
:bwipe!
|
|
||||||
:set bin noeol key=
|
|
||||||
:call append(0, cm0_bytes)
|
|
||||||
:$d
|
|
||||||
:set fenc=latin1
|
|
||||||
:w! Xtestfile
|
|
||||||
:bwipe!
|
|
||||||
:set nobin
|
|
||||||
:e Xtestfile
|
|
||||||
foofoo
|
|
||||||
:let cm0_read_bin = getline('.', '$')
|
|
||||||
:bwipe!
|
|
||||||
:set bin noeol key=
|
|
||||||
:call append(0, cm1_bytes)
|
|
||||||
:$d
|
|
||||||
:set fenc=latin1
|
|
||||||
:w! Xtestfile
|
|
||||||
:bwipe!
|
|
||||||
:set nobin
|
|
||||||
:e Xtestfile
|
|
||||||
barbar
|
|
||||||
:let cm1_read_bin = getline('.', '$')
|
|
||||||
:bwipe!
|
|
||||||
:set bin noeol key=
|
|
||||||
:call append(0, cm2_bytes)
|
|
||||||
:$d
|
|
||||||
:set fenc=latin1
|
|
||||||
:w! Xtestfile
|
|
||||||
:bwipe!
|
|
||||||
:set nobin
|
|
||||||
:e Xtestfile
|
|
||||||
barburp
|
|
||||||
:call append(0, cm1_read_bin)
|
|
||||||
:call append(0, cm0_read_bin)
|
|
||||||
:call append(0, cm2_read_back)
|
|
||||||
:call append(0, cm1_read_back)
|
|
||||||
:call append(0, cm0_read_back)
|
|
||||||
:set key= fenc=latin1
|
|
||||||
:w! test.out
|
|
||||||
:qa!
|
|
||||||
ENDTEST
|
|
||||||
|
|
@@ -1,15 +0,0 @@
|
|||||||
01234567890123456789012345678901234567
|
|
||||||
line 2 foo bar blah
|
|
||||||
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
||||||
OK 01234567890123456789012345678901234567
|
|
||||||
OK line 2 foo bar blah
|
|
||||||
OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
||||||
OK OK 01234567890123456789012345678901234567
|
|
||||||
OK OK line 2 foo bar blah
|
|
||||||
OK OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
||||||
1234567890
|
|
||||||
a<EFBFBD>bbccdde<EFBFBD>ff
|
|
||||||
asdfasdfasdf
|
|
||||||
0001112223333
|
|
||||||
abcdefghijklmnopqrstuvwxyz
|
|
||||||
!@#$%^&*()_+=-`~
|
|
@@ -1,18 +0,0 @@
|
|||||||
|
|
||||||
start of text
|
|
||||||
01234567890123456789012345678901234567
|
|
||||||
line 2 foo bar blah
|
|
||||||
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
||||||
end of text
|
|
||||||
|
|
||||||
start of cm=zip bytes
|
|
||||||
VimCrypt~01!lV'<27>}Mg<4D><67><EFBFBD>V<EFBFBD><56>E#3<>2U<32><55>
|
|
||||||
end of cm=zip bytes
|
|
||||||
|
|
||||||
start of cm=blowfish bytes
|
|
||||||
VimCrypt~02!k)<29><17>#<16>S<EFBFBD><53>=<3D><><EFBFBD>#<23>M<EFBFBD><4D>J<EFBFBD>AͥM<CDA5><4D>!<21><15><><0F><><19><16><>
|
|
||||||
<EFBFBD>
|
|
||||||
end of cm=blowfish bytes
|
|
||||||
|
|
||||||
start of cm=blowfish2 bytes
|
|
||||||
VimCrypt~03!<1E>N<EFBFBD>;<3B><><EFBFBD>^C)<04>.<2E><>FS<19><>6<EFBFBD>[T˧<54>ؾ9<0B>2Q<><51>@<40>ߚ<>Iv<49>.<2E><><EFBFBD><EFBFBD>`<60>$<24>%<25>
|
|
@@ -1,5 +1,8 @@
|
|||||||
" Tests for encryption.
|
" Tests for encryption.
|
||||||
" TODO: include tests from test71.
|
|
||||||
|
if !has('cryptv')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
func Common_head_only(text)
|
func Common_head_only(text)
|
||||||
" This was crashing Vim
|
" This was crashing Vim
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
14,
|
||||||
/**/
|
/**/
|
||||||
13,
|
13,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user