Mercurial > vim
comparison src/testdir/test_crypt.vim @ 10221:fb1fde4fcff7 v8.0.0010
commit https://github.com/vim/vim/commit/680e015bfe19be6772d3bd754486fbd45c1a9d3b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 25 20:54:11 2016 +0200
patch 8.0.0010
Problem: Crash when editing file that starts with crypt yeader. (igor2x)
Solution: Check for length of text. (Christian Brabandt) Add a test.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 25 Sep 2016 21:00:04 +0200 |
parents | |
children | 820fe7530856 |
comparison
equal
deleted
inserted
replaced
10220:168cad9ba374 | 10221:fb1fde4fcff7 |
---|---|
1 " Tests for encryption. | |
2 " TODO: include tests from test71. | |
3 | |
4 func Common_head_only(text) | |
5 " This was crashing Vim | |
6 split Xtest.txt | |
7 call setline(1, a:text) | |
8 wq | |
9 call feedkeys(":split Xtest.txt\<CR>foobar\<CR>", "tx") | |
10 call delete('Xtest.txt') | |
11 call assert_match('VimCrypt', getline(1)) | |
12 bwipe! | |
13 endfunc | |
14 | |
15 func Test_head_only_2() | |
16 call Common_head_only('VimCrypt~02!abc') | |
17 endfunc | |
18 | |
19 func Test_head_only_3() | |
20 call Common_head_only('VimCrypt~03!abc') | |
21 endfunc | |
22 " Tests for encryption. | |
23 " TODO: include tests from test71. | |
24 | |
25 func Common_head_only(text) | |
26 " This was crashing Vim | |
27 split Xtest.txt | |
28 call setline(1, a:text) | |
29 wq | |
30 call feedkeys(":split Xtest.txt\<CR>foobar\<CR>", "tx") | |
31 call delete('Xtest.txt') | |
32 call assert_match('VimCrypt', getline(1)) | |
33 bwipe! | |
34 endfunc | |
35 | |
36 func Test_head_only_2() | |
37 call Common_head_only('VimCrypt~02!abc') | |
38 endfunc | |
39 | |
40 func Test_head_only_3() | |
41 call Common_head_only('VimCrypt~03!abc') | |
42 endfunc |