annotate src/testdir/test71.in @ 5830:e8ffd1e6c8dc v7.4.258

updated for version 7.4.258 Problem: Configure fails if $CC contains options. Solution: Remove quotes around $CC. (Paul Barker)
author Bram Moolenaar <bram@vim.org>
date Sat, 12 Apr 2014 13:12:24 +0200
parents d6ceddc0be86
children 18ac55444b37
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('.', '.')
4956
5cd32322154c updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents: 2360
diff changeset
16 :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
17 :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
18 :$d
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :X
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 foobar
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 foobar
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :w! Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :bwipe!
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :e Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 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
26 :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
27 :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
28 :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
29 :" 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
30 :%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
31 :X
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 barfoo
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 barfoo
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :w! Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 :bwipe!
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :e Xtestfile
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 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
38 :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
39 :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
40 :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
41 :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
42 :$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
43 :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
44 :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
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 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
47 :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
48 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
49 :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
50 :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
51 :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
52 :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
53 :$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
54 :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
55 :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
56 :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
57 :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
58 :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
59 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
60 :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
61 :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
62 :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
63 :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
64 :w! test.out
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 :qa!
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 ENDTEST
f60a0c9cbe6c Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67