annotate src/testdir/test71.in @ 3233:1cedbee50ca6 v7.3.386

updated for version 7.3.386 Problem: Test 83 fails when iconv does not support cp932. (raf) Solution: Test if conversion works. (Yukihiro Nakadaira)
author Bram Moolenaar <bram@vim.org>
date Fri, 23 Dec 2011 14:56:28 +0100
parents d8e4b27cef80
children 5cd32322154c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2180
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Test for encryption.
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :so small.vim
2204
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
5 :/^start of text/+1
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
6 :let text_lines = getline('.', line('.') + 2)
2360
d8e4b27cef80 Change 'cryptmethod' from a number to a string option. Make it global-local.
Bram Moolenaar <bram@vim.org>
parents: 2265
diff changeset
7 :/^start of cm=zip bytes/+1
2204
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
8 :let cm0_bytes = getline('.', '.')
2360
d8e4b27cef80 Change 'cryptmethod' from a number to a string option. Make it global-local.
Bram Moolenaar <bram@vim.org>
parents: 2265
diff changeset
9 :/^start of cm=blowfish bytes/+1
2204
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
10 :let cm1_bytes = getline('.', '.')
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
11 :bwipe
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
12 :call append(0, text_lines)
2180
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :$d
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :X
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 foobar
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 foobar
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 :w! Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :bwipe!
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :e Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 foobar
2204
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
21 :let cm0_read_back = getline('.', '$')
2180
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :set key=
2360
d8e4b27cef80 Change 'cryptmethod' from a number to a string option. Make it global-local.
Bram Moolenaar <bram@vim.org>
parents: 2265
diff changeset
23 :set cryptmethod=blowfish
d8e4b27cef80 Change 'cryptmethod' from a number to a string option. Make it global-local.
Bram Moolenaar <bram@vim.org>
parents: 2265
diff changeset
24 :" If the blowfish test fails 'cryptmethod' will be 'zip' now.
d8e4b27cef80 Change 'cryptmethod' from a number to a string option. Make it global-local.
Bram Moolenaar <bram@vim.org>
parents: 2265
diff changeset
25 :%s/^/\=&cryptmethod == 'blowfish' ? "OK " : "blowfish test failed "/
2180
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :X
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 barfoo
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 barfoo
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :w! Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :bwipe!
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 :e Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 barfoo
2204
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
33 :let cm1_read_back = getline('.', '$')
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
34 :bwipe!
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
35 :set bin noeol key=
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
36 :call append(0, cm0_bytes)
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
37 :$d
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
38 :set fenc=latin1
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
39 :w! Xtestfile
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
40 :bwipe!
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
41 :set nobin
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
42 :e Xtestfile
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
43 foofoo
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
44 :let cm0_read_bin = getline('.', '$')
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
45 :bwipe!
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
46 :set bin noeol key=
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
47 :call append(0, cm1_bytes)
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
48 :$d
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
49 :set fenc=latin1
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
50 :w! Xtestfile
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
51 :bwipe!
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
52 :set nobin
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
53 :e Xtestfile
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
54 barbar
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
55 :call append(0, cm0_read_bin)
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
56 :call append(0, cm1_read_back)
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
57 :call append(0, cm0_read_back)
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
58 :set key= fenc=latin1
2180
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 :w! test.out
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 :qa!
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 ENDTEST
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62
2204
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
63 start of text
2180
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 01234567890123456789012345678901234567
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 line 2 foo bar blah
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2204
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
67 end of text
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
68
2360
d8e4b27cef80 Change 'cryptmethod' from a number to a string option. Make it global-local.
Bram Moolenaar <bram@vim.org>
parents: 2265
diff changeset
69 start of cm=zip bytes
2204
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
70 VimCrypt~01!lV'Þ}Mg ê£V©çE#3Ž2Ué—
2360
d8e4b27cef80 Change 'cryptmethod' from a number to a string option. Make it global-local.
Bram Moolenaar <bram@vim.org>
parents: 2265
diff changeset
71 end of cm=zip bytes
2204
c493d6bfde09 A few more changes for encryption. Add test that encrypted file can be read.
Bram Moolenaar <bram@vim.org>
parents: 2180
diff changeset
72
2360
d8e4b27cef80 Change 'cryptmethod' from a number to a string option. Make it global-local.
Bram Moolenaar <bram@vim.org>
parents: 2265
diff changeset
73 start of cm=blowfish bytes
2265
b7cb69ab616d Added salt to blowfish encryption.
Bram Moolenaar <bram@vim.org>
parents: 2204
diff changeset
74 VimCrypt~02!k)¾—#ÝSœõ=ºàÈ#¥M´†JÃAÍ¥M´†!€›õáÒ‚˜÷ Ú
2360
d8e4b27cef80 Change 'cryptmethod' from a number to a string option. Make it global-local.
Bram Moolenaar <bram@vim.org>
parents: 2265
diff changeset
75 end of cm=blowfish bytes