File: test77.in

package info (click to toggle)
vim 2%3A8.0.0197-4%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 60,600 kB
  • sloc: ansic: 320,650; cpp: 4,144; makefile: 3,536; perl: 1,179; awk: 715; sh: 682; xml: 526; lisp: 501; cs: 458; python: 410; asm: 114; csh: 6
file content (30 lines) | stat: -rw-r--r-- 719 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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.

STARTTEST
:so small.vim
:if !executable("cksum")
: e! test.ok
: w! test.out
: qa!
:endif
:set fileformat=unix undolevels=-1
ggdG
:let i = 1
:while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile
ggdd
:w! Xtest
:r !cksum Xtest
:s/\s/ /g
:set fileformat&
:.w! test.out
:qa!
ENDTEST