annotate src/testdir/test71.in @ 6584:d129b939a190 v7.4.618

updated for version 7.4.618 Problem: luaV_setref() is missing a return statement. (Ozaki Kiichi) Solution: Put the return statement back.
author Bram Moolenaar <bram@vim.org>
date Tue, 03 Feb 2015 23:10:46 +0100
parents 18ac55444b37
children
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.
5080
d6ceddc0be86 updated for version 7.3.1283
Bram Moolenaar <bram@vim.org>
parents: 4956
diff changeset
2 The test data is in another file to avoid problems with 'encoding', especially
d6ceddc0be86 updated for version 7.3.1283
Bram Moolenaar <bram@vim.org>
parents: 4956
diff changeset
3 cp932.
2180
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 STARTTEST
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :so small.vim
5080
d6ceddc0be86 updated for version 7.3.1283
Bram Moolenaar <bram@vim.org>
parents: 4956
diff changeset
7 :set enc=latin1
d6ceddc0be86 updated for version 7.3.1283
Bram Moolenaar <bram@vim.org>
parents: 4956
diff changeset
8 :bwipe!
d6ceddc0be86 updated for version 7.3.1283
Bram Moolenaar <bram@vim.org>
parents: 4956
diff changeset
9 :r test71a.in
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 :/^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
11 :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
12 :/^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
13 :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
14 :/^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
15 :let cm1_bytes = getline('.', '.')
6122
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
16 :/^start of cm=blowfish2 bytes/+1
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
17 :let cm2_bytes = getline('.', '.')
4956
5cd32322154c updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents: 2360
diff changeset
18 :bwipe!
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
19 :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
20 :$d
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :X
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 foobar
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 foobar
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :w! Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :bwipe!
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :e Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 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
28 :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
29 :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
30 :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
31 :" 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
32 :%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
33 :X
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 barfoo
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 barfoo
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :w! Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :bwipe!
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 :e Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 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
40 :let cm1_read_back = getline('.', '$')
6122
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
41 :set key=
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
42 :set cryptmethod=blowfish2
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
43 :" If the blowfish test fails 'cryptmethod' will be 'zip' now.
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
44 :%s/^/\=&cryptmethod == 'blowfish2' ? "OK " : "blowfish test failed "/
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
45 :X
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
46 bar2foo
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
47 bar2foo
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
48 :w! Xtestfile
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
49 :bwipe!
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
50 :e Xtestfile
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
51 bar2foo
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
52 :let cm2_read_back = getline('.', '$')
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
53 :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
54 :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
55 :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
56 :$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
57 :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
58 :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
59 :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
60 :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
61 :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
62 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
63 :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
64 :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
65 :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
66 :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
67 :$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
68 :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
69 :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
70 :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
71 :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
72 :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
73 barbar
6122
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
74 :let cm1_read_bin = getline('.', '$')
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
75 :bwipe!
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
76 :set bin noeol key=
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
77 :call append(0, cm2_bytes)
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
78 :$d
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
79 :set fenc=latin1
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
80 :w! Xtestfile
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
81 :bwipe!
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
82 :set nobin
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
83 :e Xtestfile
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
84 barburp
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
85 :call append(0, cm1_read_bin)
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
86 :call append(0, cm0_read_bin)
6122
18ac55444b37 updated for version 7.4.399
Bram Moolenaar <bram@vim.org>
parents: 5080
diff changeset
87 :call append(0, cm2_read_back)
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
88 :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
89 :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
90 :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
91 :w! test.out
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 :qa!
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 ENDTEST
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94