Tizen 2.0 Release
[external/vim.git] / src / testdir / test71.in
1 Test for encryption.
2
3 STARTTEST
4 :so small.vim
5 :/^start of text/+1
6 :let text_lines = getline('.', line('.') + 2)
7 :/^start of cm=zip bytes/+1
8 :let cm0_bytes = getline('.', '.')
9 :/^start of cm=blowfish bytes/+1
10 :let cm1_bytes = getline('.', '.')
11 :bwipe
12 :call append(0, text_lines)
13 :$d
14 :X
15 foobar
16 foobar
17 :w! Xtestfile
18 :bwipe!
19 :e Xtestfile
20 foobar
21 :let cm0_read_back = getline('.', '$')
22 :set key=
23 :set cryptmethod=blowfish
24 :" If the blowfish test fails 'cryptmethod' will be 'zip' now.
25 :%s/^/\=&cryptmethod == 'blowfish' ? "OK " : "blowfish test failed "/
26 :X
27 barfoo
28 barfoo
29 :w! Xtestfile
30 :bwipe!
31 :e Xtestfile
32 barfoo
33 :let cm1_read_back = getline('.', '$')
34 :bwipe!
35 :set bin noeol key=
36 :call append(0, cm0_bytes)
37 :$d
38 :set fenc=latin1
39 :w! Xtestfile
40 :bwipe!
41 :set nobin
42 :e Xtestfile
43 foofoo
44 :let cm0_read_bin = getline('.', '$')
45 :bwipe!
46 :set bin noeol key=
47 :call append(0, cm1_bytes)
48 :$d
49 :set fenc=latin1
50 :w! Xtestfile
51 :bwipe!
52 :set nobin
53 :e Xtestfile
54 barbar
55 :call append(0, cm0_read_bin)
56 :call append(0, cm1_read_back)
57 :call append(0, cm0_read_back)
58 :set key= fenc=latin1
59 :w! test.out
60 :qa!
61 ENDTEST
62
63 start of text
64 01234567890123456789012345678901234567
65 line 2  foo bar blah
66 line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
67 end of text
68
69 start of cm=zip bytes
70 VimCrypt~01!\ 6\1clV'Þ}Mg ê£V©ç\aE#3\8e2Ué\97
71 end of cm=zip bytes
72
73 start of cm=blowfish bytes
74 VimCrypt~02!k)¾\17\97#\16ÝS\9cõ=ºàÈ#¥M´\86JÃAÍ¥M´\86!\80\15\9bõ\ fáÒ\19\82\16\98÷\rÚ
75 end of cm=blowfish bytes