diff options
| author | Bram Moolenaar <Bram@vim.org> | 2016-09-26 20:14:56 +0200 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2016-09-26 20:14:56 +0200 |
| commit | 1eceadaf481e34ed8155011534159775697ce884 (patch) | |
| tree | 9702813aaebc0ea9b0c213265be56ab61a0c360f /src/testdir | |
| parent | c79d6aa01d86cd98cffddc80825c1c600e833bbf (diff) | |
| download | vim-git-1eceadaf481e34ed8155011534159775697ce884.tar.gz | |
patch 8.0.0014v8.0.0014
Problem: Crypt tests are old style.
Solution: Convert to new style.
Diffstat (limited to 'src/testdir')
| -rw-r--r-- | src/testdir/Make_all.mak | 1 | ||||
| -rw-r--r-- | src/testdir/test71.in | 94 | ||||
| -rw-r--r-- | src/testdir/test71.ok | 15 | ||||
| -rw-r--r-- | src/testdir/test71a.in | 18 | ||||
| -rw-r--r-- | src/testdir/test_crypt.vim | 5 |
5 files changed, 4 insertions, 129 deletions
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak index 999f519ab..0909f4f7c 100644 --- a/src/testdir/Make_all.mak +++ b/src/testdir/Make_all.mak @@ -53,7 +53,6 @@ SCRIPTS_ALL = \ test68.out \ test69.out \ test70.out \ - test71.out \ test73.out \ test75.out \ test76.out \ diff --git a/src/testdir/test71.in b/src/testdir/test71.in deleted file mode 100644 index 944b69dc5..000000000 --- a/src/testdir/test71.in +++ /dev/null @@ -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 - diff --git a/src/testdir/test71.ok b/src/testdir/test71.ok deleted file mode 100644 index de1b0ab83..000000000 --- a/src/testdir/test71.ok +++ /dev/null @@ -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ábbccddeëff -asdfasdfasdf -0001112223333 -abcdefghijklmnopqrstuvwxyz -!@#$%^&*()_+=-`~ diff --git a/src/testdir/test71a.in b/src/testdir/test71a.in deleted file mode 100644 index e79a39895..000000000 --- a/src/testdir/test71a.in +++ /dev/null @@ -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'Þ}Mg ê£V©çE#3Ž2Ué— -end of cm=zip bytes - -start of cm=blowfish bytes -VimCrypt~02!k)¾—#ÝSœõ=ºàÈ#¥M´†JÃAÍ¥M´†!€›õáÒ‚˜÷
Ú -end of cm=blowfish bytes - -start of cm=blowfish2 bytes -VimCrypt~03!ÑNã;ÓÀ ^C)÷.¶«FSà‹6Ò[T˧…ؾ9�2Q³Ì@—ßšIvª.ØÉîž`½$¯%Ð -end of cm=blowfish2 bytes diff --git a/src/testdir/test_crypt.vim b/src/testdir/test_crypt.vim index 96b8b1bfa..4e9cc2e51 100644 --- a/src/testdir/test_crypt.vim +++ b/src/testdir/test_crypt.vim @@ -1,5 +1,8 @@ " Tests for encryption. -" TODO: include tests from test71. + +if !has('cryptv') + finish +endif func Common_head_only(text) " This was crashing Vim |
