Patch 9.0.1017
Problem:    Test for srand() fails on MS-Windows.
Solution:   Do not expect the same result a second time.
Files:      src/testdir/test_random.vim


*** ../vim-9.0.1016/src/testdir/test_random.vim 2022-12-05 21:55:49.183027029 
+0000
--- src/testdir/test_random.vim 2022-12-06 09:03:57.326413871 +0000
***************
*** 12,28 ****
    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
  
    call test_srand_seed(123456789)
    call assert_equal(4284103975, rand())
--- 12,20 ----
    call assert_equal(2658065534, rand(r))
    call assert_equal(3104308804, rand(r))
  
    let s = srand()
!   " 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,44 ****
    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()
--- 29,34 ----
*** ../vim-9.0.1016/src/version.c       2022-12-05 22:26:40.259110192 +0000
--- src/version.c       2022-12-06 09:04:56.742456201 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1017,
  /**/

-- 
"Marriage is a wonderful institution...
but who wants to live in an institution?"
 - Groucho Marx

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221206090555.0ACFE1C1D84%40moolenaar.net.

Raspunde prin e-mail lui