robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
af23d17388
master
1" Tests for large files 2" This is only executed manually: "TEST_FILE=test_largefile.res make oldtest". 3" This is not run as part of "make test". 4 5func Test_largefile () 6let fname = 'Xlarge.txt' 7 8call delete ( fname ) 9exe "e" fname 10" Make sure that a line break is 1 byte (LF). 11set ff = unix 12set undolevels = -1 13" Input 99 'A's. The line becomes 100 bytes including a line break. 14exe "normal 99iA\<Esc>" 15yank 16" Put 39,999,999 times. The file becomes 4,000,000,000 bytes. 17normal 39999999p 18" Moving around in the file randomly. 19normal G 20normal 10% 21normal 90% 22normal 50% 23normal gg 24w 25" Check if the file size is 4,000,000,000 bytes. 26let fsize = getfsize ( fname ) 27call assert_true ( fsize == 4000000000 ) 28call delete ( fname ) 29endfunc