diff options
Diffstat (limited to 'src/testdir/test_random.vim')
-rw-r--r-- | src/testdir/test_random.vim | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/testdir/test_random.vim b/src/testdir/test_random.vim index 747e43848..bdb7e1db0 100644 --- a/src/testdir/test_random.vim +++ b/src/testdir/test_random.vim @@ -11,7 +11,7 @@ func Test_Rand() 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 @@ -21,9 +21,10 @@ func Test_Rand() call assert_notequal(s, srand()) endif - call srand() - let v = rand() - call assert_notequal(v, rand()) + 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:') @@ -38,3 +39,9 @@ func Test_Rand() call test_settime(0) endfunc + +func Test_issue_5587() + call rand() + call garbagecollect() + call rand() +endfunc |