changeset 9393:c4aae9421aec v7.4.1978

commit https://github.com/vim/vim/commit/c5af40ae646ceda817eff93b4f9ba274f031bea6 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 1 21:49:06 2016 +0200 patch 7.4.1978 Problem: Large file test does not delete its output. Solution: Delete the output. Check size properly when possible. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Fri, 01 Jul 2016 22:00:07 +0200
parents 6629bab9f8f6
children bea9958b35a9
files src/testdir/test_largefile.vim src/version.c
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_largefile.vim
+++ b/src/testdir/test_largefile.vim
@@ -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
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1978,
+/**/
     1977,
 /**/
     1976,