Mercurial > vim
comparison src/testdir/test_file_size.vim @ 12560:44aa2997239d v8.0.1158
patch 8.0.1158: still old style tests
commit https://github.com/vim/vim/commit/db51007108a6ab0671e7f7b4844557cbe647185f
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 28 21:52:17 2017 +0200
patch 8.0.1158: still old style tests
Problem: Still old style tests.
Solution: Convert serveral tests to new style. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 28 Sep 2017 22:00:05 +0200 |
parents | f1635be0e963 |
children | 1fad9675d8fd |
comparison
equal
deleted
inserted
replaced
12559:34c8ec888122 | 12560:44aa2997239d |
---|---|
26 | 26 |
27 enew! | 27 enew! |
28 call delete('Xtest') | 28 call delete('Xtest') |
29 set belloff& fileformat& undolevels& | 29 set belloff& fileformat& undolevels& |
30 endfunc | 30 endfunc |
31 | |
32 " Test for writing and reading a file of over 100 Kbyte | |
33 func Test_File_Read_Write() | |
34 enew! | |
35 | |
36 " Create a file with the following contents | |
37 " 1 line: "This is the start" | |
38 " 3001 lines: "This is the leader" | |
39 " 1 line: "This is the middle" | |
40 " 3001 lines: "This is the trailer" | |
41 " 1 line: "This is the end" | |
42 call append(0, "This is the start") | |
43 call append(1, repeat(["This is the leader"], 3001)) | |
44 call append(3002, "This is the middle") | |
45 call append(3003, repeat(["This is the trailer"], 3001)) | |
46 call append(6004, "This is the end") | |
47 | |
48 write! Xtest | |
49 enew! | |
50 edit! Xtest | |
51 | |
52 call assert_equal("This is the start", getline(1)) | |
53 call assert_equal("This is the middle", getline(3003)) | |
54 call assert_equal("This is the end", getline(6005)) | |
55 | |
56 enew! | |
57 call delete("Xtest") | |
58 endfunc |