Mercurial > vim
view src/testdir/test_file_size.vim @ 12074:ca55e69d9d1b v8.0.0917
patch 8.0.0917: MS-Windows:CTRL-C handling in terminal window is wrong
commit https://github.com/vim/vim/commit/589b1109c55409baf27f79920d8ffc95111eaa01
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 12 16:39:05 2017 +0200
patch 8.0.0917: MS-Windows:CTRL-C handling in terminal window is wrong
Problem: MS-Windows:CTRL-C handling in terminal window is wrong
Solution: Pass CTRL-C as a key. Turn CTRL-BREAK into a key stroke. (Yasuhiro
Matsumoto, closes #1965)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 12 Aug 2017 16:45:04 +0200 |
parents | f1635be0e963 |
children | 44aa2997239d |
line wrap: on
line source
" Inserts 2 million lines with consecutive integers starting from 1 " (essentially, the output of GNU's seq 1 2000000), writes them to Xtest " and writes its cksum to test.out. " " We need 2 million lines to trigger a call to mf_hash_grow(). If it would mess " up the lines the checksum would differ. " " cksum is part of POSIX and so should be available on most Unixes. " If it isn't available then the test will be skipped. func Test_File_Size() if !executable('cksum') return endif new set belloff=all fileformat=unix undolevels=-1 for i in range(1, 2000000, 100) call append(i, range(i, i + 99)) endfor 1delete w! Xtest let res = systemlist('cksum Xtest')[0] let res = substitute(res, "\r", "", "") call assert_equal('3678979763 14888896 Xtest', res) enew! call delete('Xtest') set belloff& fileformat& undolevels& endfunc