To: vim_dev@googlegroups.com Subject: Patch 9.0.1017 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///