<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/testdir/test_random.vim, branch userregs_2</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>test: move oldtests to test directory (#22536)</title>
<updated>2023-03-07T03:13:04+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2023-03-07T03:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=af23d173883f47fd02a9a380c719e4428370b484'/>
<id>af23d173883f47fd02a9a380c719e4428370b484</id>
<content type='text'>
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9.0.1017: test for srand() fails on MS-Windows (#21308)</title>
<updated>2022-12-06T09:41:57+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-12-06T09:41:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=9628348a6a547db17f3867f48ae43ff71bbf6324'/>
<id>9628348a6a547db17f3867f48ae43ff71bbf6324</id>
<content type='text'>
Problem:    Test for srand() fails on MS-Windows.
Solution:   Do not expect the same result a second time.

https://github.com/vim/vim/commit/9dacdb1d56ee0f9272f3fc956a12f15f84ffb205

Co-authored-by: Bram Moolenaar &lt;Bram@vim.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Test for srand() fails on MS-Windows.
Solution:   Do not expect the same result a second time.

https://github.com/vim/vim/commit/9dacdb1d56ee0f9272f3fc956a12f15f84ffb205

Co-authored-by: Bram Moolenaar &lt;Bram@vim.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9.0.1015: without /dev/urandom srand() seed is too predictable (#21303)</title>
<updated>2022-12-06T01:15:04+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-12-06T01:15:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=5199c333a072933d6a2bb8b9e99076761da7396a'/>
<id>5199c333a072933d6a2bb8b9e99076761da7396a</id>
<content type='text'>
Problem:    Without /dev/urandom srand() seed is too predictable.
Solution:   Use micro seconds and XOR with process ID. (Yasuhiro Matsumoto,
            closes vim/vim#11656)

https://github.com/vim/vim/commit/f0a9c004825ab686270ee57260652cce25e61049

Co-authored-by: Yasuhiro Matsumoto &lt;mattn.jp@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Without /dev/urandom srand() seed is too predictable.
Solution:   Use micro seconds and XOR with process ID. (Yasuhiro Matsumoto,
            closes vim/vim#11656)

https://github.com/vim/vim/commit/f0a9c004825ab686270ee57260652cce25e61049

Co-authored-by: Yasuhiro Matsumoto &lt;mattn.jp@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:partial:8.2.1183: assert_fails() checks the last error message</title>
<updated>2022-11-05T04:27:45+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-11-04T23:24:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=8b0c5de4e0964109326a0befb1b3bff6aac4d0db'/>
<id>8b0c5de4e0964109326a0befb1b3bff6aac4d0db</id>
<content type='text'>
Problem:    assert_fails() checks the last error message.
Solution:   Check the first error, it is more relevant.  Fix all the tests
            that rely on the old behavior.

https://github.com/vim/vim/commit/9b7bf9e98f06ece595fed7a3ff53ecce89797a53

Skip test_listener.vim, test_textprop.vim, test_viminfo.vim.
Skip test_python2.vim: affected line fails and hasn't been ported.
Skip test_python3.vim: affected lines fail and haven't been ported.
Skip CHECK_LIST_MATERIALIZE.

Co-authored-by: Bram Moolenaar &lt;Bram@vim.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    assert_fails() checks the last error message.
Solution:   Check the first error, it is more relevant.  Fix all the tests
            that rely on the old behavior.

https://github.com/vim/vim/commit/9b7bf9e98f06ece595fed7a3ff53ecce89797a53

Skip test_listener.vim, test_textprop.vim, test_viminfo.vim.
Skip test_python2.vim: affected line fails and hasn't been ported.
Skip test_python3.vim: affected lines fail and haven't been ported.
Skip CHECK_LIST_MATERIALIZE.

Co-authored-by: Bram Moolenaar &lt;Bram@vim.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.2.0233: crash when using garbagecollect() in between rand()</title>
<updated>2022-02-05T14:01:00+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2022-01-10T10:31:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=4f7a8991a93ddb1b6ab7cd8a8f21b5197c4612bb'/>
<id>4f7a8991a93ddb1b6ab7cd8a8f21b5197c4612bb</id>
<content type='text'>
Problem:    Crash when using garbagecollect() in between rand().
Solution:   Redesign the rand() and srand() implementation. (Yasuhiro
            Matsumoto, closes vim/vim#5587, closes vim/vim#5588)
https://github.com/vim/vim/commit/4f645c54efe33d7a11e314676e503118761f08a7

Omit test_srand_seed.
Unmacroify SHUFFLE_XOSHIRO128STARSTAR and SPLITMIX32 while we're at it (leave
ROTL alone as it's fairly innocent).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Crash when using garbagecollect() in between rand().
Solution:   Redesign the rand() and srand() implementation. (Yasuhiro
            Matsumoto, closes vim/vim#5587, closes vim/vim#5588)
https://github.com/vim/vim/commit/4f645c54efe33d7a11e314676e503118761f08a7

Omit test_srand_seed.
Unmacroify SHUFFLE_XOSHIRO128STARSTAR and SPLITMIX32 while we're at it (leave
ROTL alone as it's fairly innocent).
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.2357: no test with wrong argument for rand()</title>
<updated>2022-02-05T14:00:59+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2022-01-10T00:49:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=cc7ccf6d31d14457070055be07884edaf2eb165f'/>
<id>cc7ccf6d31d14457070055be07884edaf2eb165f</id>
<content type='text'>
Problem:    No test with wrong argument for rand().
Solution:   Add a test case.
https://github.com/vim/vim/commit/68e9e5f7fccb8038cf0ca5b5d95c85a923152f46
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    No test with wrong argument for rand().
Solution:   Add a test case.
https://github.com/vim/vim/commit/68e9e5f7fccb8038cf0ca5b5d95c85a923152f46
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.2356: rand() does not use the best algorithm</title>
<updated>2022-02-05T14:00:59+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2022-01-09T23:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=c97614d98fc7ab040851b7fe1bc4cb575ce8c627'/>
<id>c97614d98fc7ab040851b7fe1bc4cb575ce8c627</id>
<content type='text'>
Problem:    rand() does not use the best algorithm.
Solution:   use xoshiro128** instead of xorshift. (Kaito Udagawa,
            closes vim/vim#5279)
https://github.com/vim/vim/commit/f8c1f9200c4b50969a8191a4fe0b0d09edb38979
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    rand() does not use the best algorithm.
Solution:   use xoshiro128** instead of xorshift. (Kaito Udagawa,
            closes vim/vim#5279)
https://github.com/vim/vim/commit/f8c1f9200c4b50969a8191a4fe0b0d09edb38979
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.2343: using time() for srand() is not very random</title>
<updated>2022-02-05T14:00:35+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2022-01-09T23:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=f6a0d5498b5f0d62e10f7ba891bc6ea5e20dad69'/>
<id>f6a0d5498b5f0d62e10f7ba891bc6ea5e20dad69</id>
<content type='text'>
Problem:    Using time() for srand() is not very random.
Solution:   use /dev/urandom if available
https://github.com/vim/vim/commit/07e4a197953d12902fb97beb48830a5323a52280

Use os_open and os_close.

time_settime is N/A, so some parts of the test are disabled.

There's maybe a very, very, very, very small chance the /dev/urandom test fails,
but it shouldn't matter. :P
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Using time() for srand() is not very random.
Solution:   use /dev/urandom if available
https://github.com/vim/vim/commit/07e4a197953d12902fb97beb48830a5323a52280

Use os_open and os_close.

time_settime is N/A, so some parts of the test are disabled.

There's maybe a very, very, very, very small chance the /dev/urandom test fails,
but it shouldn't matter. :P
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.2342: random number generator in Vim script is slow</title>
<updated>2022-02-05T13:16:34+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2022-01-09T22:48:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=22f0725aac300ed9b249f995df7889f6c203d1e0'/>
<id>22f0725aac300ed9b249f995df7889f6c203d1e0</id>
<content type='text'>
Problem:    Random number generator in Vim script is slow.
Solution:   Add rand() and srand(). (Yasuhiro Matsumoto, closes vim/vim#1277)
https://github.com/vim/vim/commit/06b0b4bc27077013e9b4b48fd1d9b33e543ccf99

Add missing method call usage to builtin.txt.
vim_time and test_settime is N/A.
Add a modeline to test_random.vim.
Use typval_T* over listitem_T* vars so we don't need to use TV_LIST_ITEM_TV all
over the place...
Remove NULL list checks (tv_list_len covers this).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Random number generator in Vim script is slow.
Solution:   Add rand() and srand(). (Yasuhiro Matsumoto, closes vim/vim#1277)
https://github.com/vim/vim/commit/06b0b4bc27077013e9b4b48fd1d9b33e543ccf99

Add missing method call usage to builtin.txt.
vim_time and test_settime is N/A.
Add a modeline to test_random.vim.
Use typval_T* over listitem_T* vars so we don't need to use TV_LIST_ITEM_TV all
over the place...
Remove NULL list checks (tv_list_len covers this).
</pre>
</div>
</content>
</entry>
</feed>
