patch 8.2.0271: the "num64" feature is available everywhere
Problem: The "num64" feature is available everywhere and building without
it causes problems.
Solution: Graduage the "num64" feature. (James McCoy, closes #5650)
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index 1281ae7..7601c4f 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -382,9 +382,7 @@
endfunc
function Test_printf_64bit()
- if has('num64')
- call assert_equal("123456789012345", printf('%d', 123456789012345))
- endif
+ call assert_equal("123456789012345", printf('%d', 123456789012345))
endfunc
function Test_printf_spec_s()
@@ -423,12 +421,8 @@
call assert_equal(" 0b1111011", printf('%#10b', 123))
call assert_equal("0B01111011", printf('%#010B', 123))
call assert_equal("1001001100101100000001011010010", printf('%b', 1234567890))
- if has('num64')
- call assert_equal("11100000100100010000110000011011101111101111001", printf('%b', 123456789012345))
- call assert_equal("1111111111111111111111111111111111111111111111111111111111111111", printf('%b', -1))
- else
- call assert_equal("11111111111111111111111111111111", printf('%b', -1))
- endif
+ call assert_equal("11100000100100010000110000011011101111101111001", printf('%b', 123456789012345))
+ call assert_equal("1111111111111111111111111111111111111111111111111111111111111111", printf('%b', -1))
endfunc
func Test_substitute_expr()
diff --git a/src/testdir/test_largefile.vim b/src/testdir/test_largefile.vim
index 1b3e02a..68d6ec9 100644
--- a/src/testdir/test_largefile.vim
+++ b/src/testdir/test_largefile.vim
@@ -24,11 +24,6 @@
w
" Check if the file size is 4,000,000,000 bytes.
let fsize=getfsize(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 assert_true(fsize == 4000000000)
call delete(fname)
endfunc
diff --git a/src/testdir/test_sort.vim b/src/testdir/test_sort.vim
index ce5592e..8299db4 100644
--- a/src/testdir/test_sort.vim
+++ b/src/testdir/test_sort.vim
@@ -1295,9 +1295,8 @@
\ '2147483647'], getline(1, '$'))
bwipe!
- if has('num64')
- new
- a
+ new
+ a
-9223372036854775808
-9223372036854775807
@@ -1312,22 +1311,21 @@
abc
.
- sort n
- call assert_equal(['',
- \ 'abc',
- \ '',
- \ '-9223372036854775808',
- \ '-9223372036854775808',
- \ '-9223372036854775807',
- \ '-9223372036854775806',
- \ '-1',
- \ '0',
- \ '1',
- \ '9223372036854775806',
- \ '9223372036854775807',
- \ '9223372036854775807'], getline(1, '$'))
- bwipe!
- endif
+ sort n
+ call assert_equal(['',
+ \ 'abc',
+ \ '',
+ \ '-9223372036854775808',
+ \ '-9223372036854775808',
+ \ '-9223372036854775807',
+ \ '-9223372036854775806',
+ \ '-1',
+ \ '0',
+ \ '1',
+ \ '9223372036854775806',
+ \ '9223372036854775807',
+ \ '9223372036854775807'], getline(1, '$'))
+ bwipe!
endfunc
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim
index a75e5f6..b16b05b 100644
--- a/src/testdir/test_vimscript.vim
+++ b/src/testdir/test_vimscript.vim
@@ -1416,10 +1416,6 @@
"-------------------------------------------------------------------------------
func Test_num64()
- if !has('num64')
- return
- endif
-
call assert_notequal( 4294967296, 0)
call assert_notequal(-4294967296, 0)
call assert_equal( 4294967296, 0xFFFFffff + 1)
@@ -1692,27 +1688,15 @@
" Test special cases: division or modulus with 0.
let x = 1
let x /= 0
- if has('num64')
- call assert_equal(0x7FFFFFFFFFFFFFFF, x)
- else
- call assert_equal(0x7fffffff, x)
- endif
+ call assert_equal(0x7FFFFFFFFFFFFFFF, x)
let x = -1
let x /= 0
- if has('num64')
- call assert_equal(-0x7FFFFFFFFFFFFFFF, x)
- else
- call assert_equal(-0x7fffffff, x)
- endif
+ call assert_equal(-0x7FFFFFFFFFFFFFFF, x)
let x = 0
let x /= 0
- if has('num64')
- call assert_equal(-0x7FFFFFFFFFFFFFFF - 1, x)
- else
- call assert_equal(-0x7FFFFFFF - 1, x)
- endif
+ call assert_equal(-0x7FFFFFFFFFFFFFFF - 1, x)
let x = 1
let x %= 0