]> granicus.if.org Git - vim/commitdiff
patch 7.4.1978 v7.4.1978
authorBram Moolenaar <Bram@vim.org>
Fri, 1 Jul 2016 19:49:06 +0000 (21:49 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 1 Jul 2016 19:49:06 +0000 (21:49 +0200)
Problem:    Large file test does not delete its output.
Solution:   Delete the output. Check size properly when possible. (Ken Takata)

src/testdir/test_largefile.vim
src/version.c

index ea2b8ff62d335bdd1a3a9dab2dbca0eaf36ef5e3..1b3e02a0c85cb534c5539fd1ec7c35ed6b089231 100644 (file)
@@ -22,9 +22,13 @@ func Test_largefile()
   normal 50%
   normal gg
   w
-  " Check if the file size is larger than 2^31 - 1 bytes.
-  " Note that getfsize() returns -2 if a Number is 32 bits.
+  " Check if the file size is 4,000,000,000 bytes.
   let fsize=getfsize(fname)
-  call assert_true(fsize > 2147483647 || fsize == -2)
-  "call delete(fname)
+  if has('num64')
+    call assert_true(fsize == 4000000000)
+  else
+    " getfsize() returns -2 if a Number is 32 bits.
+    call assert_true(fsize == -2)
+  endif
+  call delete(fname)
 endfunc
index 00b88943cea2c053a45a4e73ae9944a5824bd0aa..1613a72224ef1927a63a5b7d7d79a42beb6f0a83 100644 (file)
@@ -758,6 +758,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1978,
 /**/
     1977,
 /**/