diff options
Diffstat (limited to 'src/nvim/testdir/test_random.vim')
-rw-r--r-- | src/nvim/testdir/test_random.vim | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_random.vim b/src/nvim/testdir/test_random.vim index f953b93d51..6d3f7dcfd9 100644 --- a/src/nvim/testdir/test_random.vim +++ b/src/nvim/testdir/test_random.vim @@ -12,7 +12,7 @@ func Test_Rand() " Nvim does not support test_settime " call test_settime(12341234) let s = srand() - if filereadable('/dev/urandom') + if !has('win32') && filereadable('/dev/urandom') " using /dev/urandom call assert_notequal(s, srand()) " else @@ -22,9 +22,11 @@ func Test_Rand() " call assert_notequal(s, srand()) endif - call srand() - let v = rand() - call assert_notequal(v, rand()) + " Nvim does not support test_srand_seed + " call test_srand_seed(123456789) + " call assert_equal(4284103975, rand()) + " call assert_equal(1001954530, rand()) + " call test_srand_seed() if has('float') call assert_fails('echo srand(1.2)', 'E805:') @@ -40,4 +42,10 @@ func Test_Rand() " call test_settime(0) endfunc +func Test_issue_5587() + call rand() + call garbagecollect() + call rand() +endfunc + " vim: shiftwidth=2 sts=2 expandtab |