Mercurial > vim
annotate src/testdir/test_largefile.vim @ 12988:da725bc3fd2c v8.0.1370
patch 8.0.1370: channel test for callback is flaky
commit https://github.com/vim/vim/commit/1eca6f13d62d2201f3bf0e83400c2e3de7df3951
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 5 14:04:27 2017 +0100
patch 8.0.1370: channel test for callback is flaky
Problem: Channel test for callback is flaky.
Solution: Add the test to thelist of flaky tests.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 05 Dec 2017 14:15:04 +0100 |
parents | c4aae9421aec |
children | fdfe44ac6a1a |
rev | line source |
---|---|
9387
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for large files |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " This is only executed manually: "make test_largefile". |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 " This is not run as part of "make test". |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 func Test_largefile() |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 let fname = 'Xlarge.txt' |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 call delete(fname) |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 exe "e" fname |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 " Make sure that a line break is 1 byte (LF). |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 set ff=unix |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 set undolevels=-1 |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 " Input 99 'A's. The line becomes 100 bytes including a line break. |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 exe "normal 99iA\<Esc>" |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 yank |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 " Put 39,999,999 times. The file becomes 4,000,000,000 bytes. |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 normal 39999999p |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 " Moving around in the file randomly. |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 normal G |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 normal 10% |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 normal 90% |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 normal 50% |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 normal gg |
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 w |
9393
c4aae9421aec
commit https://github.com/vim/vim/commit/c5af40ae646ceda817eff93b4f9ba274f031bea6
Christian Brabandt <cb@256bit.org>
parents:
9387
diff
changeset
|
25 " Check if the file size is 4,000,000,000 bytes. |
9387
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 let fsize=getfsize(fname) |
9393
c4aae9421aec
commit https://github.com/vim/vim/commit/c5af40ae646ceda817eff93b4f9ba274f031bea6
Christian Brabandt <cb@256bit.org>
parents:
9387
diff
changeset
|
27 if has('num64') |
c4aae9421aec
commit https://github.com/vim/vim/commit/c5af40ae646ceda817eff93b4f9ba274f031bea6
Christian Brabandt <cb@256bit.org>
parents:
9387
diff
changeset
|
28 call assert_true(fsize == 4000000000) |
c4aae9421aec
commit https://github.com/vim/vim/commit/c5af40ae646ceda817eff93b4f9ba274f031bea6
Christian Brabandt <cb@256bit.org>
parents:
9387
diff
changeset
|
29 else |
c4aae9421aec
commit https://github.com/vim/vim/commit/c5af40ae646ceda817eff93b4f9ba274f031bea6
Christian Brabandt <cb@256bit.org>
parents:
9387
diff
changeset
|
30 " getfsize() returns -2 if a Number is 32 bits. |
c4aae9421aec
commit https://github.com/vim/vim/commit/c5af40ae646ceda817eff93b4f9ba274f031bea6
Christian Brabandt <cb@256bit.org>
parents:
9387
diff
changeset
|
31 call assert_true(fsize == -2) |
c4aae9421aec
commit https://github.com/vim/vim/commit/c5af40ae646ceda817eff93b4f9ba274f031bea6
Christian Brabandt <cb@256bit.org>
parents:
9387
diff
changeset
|
32 endif |
c4aae9421aec
commit https://github.com/vim/vim/commit/c5af40ae646ceda817eff93b4f9ba274f031bea6
Christian Brabandt <cb@256bit.org>
parents:
9387
diff
changeset
|
33 call delete(fname) |
9387
f094d4085014
commit https://github.com/vim/vim/commit/8767f52fbfd4f053ce00a978227c95f1d7d323fe
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 endfunc |