summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-06 09:05:25 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-06 09:05:25 +0000
commit9dacdb1d56ee0f9272f3fc956a12f15f84ffb205 (patch)
treeddd57e8caeeae790a053186c0773e5db1a7a1be7
parent1cb16c3a20a9d17df1a8dc3813ef64dc98e42637 (diff)
patch 9.0.1017: test for srand() fails on MS-Windowsv9.0.1017
Problem: Test for srand() fails on MS-Windows. Solution: Do not expect the same result a second time.
-rw-r--r--src/testdir/test_random.vim14
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 12 deletions
diff --git a/src/testdir/test_random.vim b/src/testdir/test_random.vim
index fdfaea2575..be8473f29d 100644
--- a/src/testdir/test_random.vim
+++ b/src/testdir/test_random.vim
@@ -12,17 +12,9 @@ func Test_Rand()
call assert_equal(2658065534, rand(r))
call assert_equal(3104308804, rand(r))
- call test_settime(12341234)
let s = srand()
- if !has('win32') && filereadable('/dev/urandom')
- " using /dev/urandom
- call assert_notequal(s, srand())
- else
- " using time()
- call assert_equal(s, srand())
- call test_settime(12341235)
- call assert_notequal(s, srand())
- endif
+ " using /dev/urandom or used time, result is different each time
+ call assert_notequal(s, srand())
call test_srand_seed(123456789)
call assert_equal(4284103975, rand())
@@ -37,8 +29,6 @@ func Test_Rand()
call assert_fails('echo rand([1, [2], 3, 4])', 'E730:')
call assert_fails('echo rand([1, 2, [3], 4])', 'E730:')
call assert_fails('echo rand([1, 2, 3, [4]])', 'E730:')
-
- call test_settime(0)
endfunc
func Test_issue_5587()
diff --git a/src/version.c b/src/version.c
index 3dbc0a0a53..4ba888e0f2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1017,
+/**/
1016,
/**/
1015,