blob: 55a1c30272f490e6d9d754d937dbe566c81293fa [file] [log] [blame]
Bram Moolenaarb3c52842011-03-22 20:52:37 +01001Inserts 2 million lines with consecutive integers starting from 1
2(essentially, the output of GNU's seq 1 2000000), writes them to Xtest
3and writes its cksum to test.out.
4
5We need 2 million lines to trigger a call to mf_hash_grow(). If it would mess
6up the lines the checksum would differ.
7
8cksum is part of POSIX and so should be available on most Unixes.
9If it isn't available then the test will be skipped.
10
11STARTTEST
12:so small.vim
Bram Moolenaarc3c766e2017-03-08 22:55:19 +010013:set belloff=all
Bram Moolenaarb3c52842011-03-22 20:52:37 +010014:if !executable("cksum")
15: e! test.ok
16: w! test.out
17: qa!
18:endif
19:set fileformat=unix undolevels=-1
20ggdG
21:let i = 1
22:while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile
23ggdd
24:w! Xtest
Bram Moolenaare8938e52012-04-30 11:34:28 +020025:r !cksum Xtest
26:s/\s/ /g
Bram Moolenaard73895e2013-06-19 21:17:31 +020027:set fileformat&
Bram Moolenaare8938e52012-04-30 11:34:28 +020028:.w! test.out
Bram Moolenaarb3c52842011-03-22 20:52:37 +010029:qa!
30ENDTEST
31