<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/eval/writefile_spec.lua, branch tmp</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>test: reorg #15698</title>
<updated>2021-09-17T16:16:40+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2021-09-17T16:16:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d8de4eb685e35646c7d541e9a75bdc296127b7e2'/>
<id>d8de4eb685e35646c7d541e9a75bdc296127b7e2</id>
<content type='text'>
Problem:
Subdirectories like "visual", "insert", "normal" encourage people to
separate *related* tests for no good reason.  Typically the _mode_ is
not the relevant topic of a test (and when it is, _then_ create
an appropriate describe() or it()).

Solution:
- Delete the various `test/functional/&lt;mode&gt;/` subdirectories, move
  their tests to more meaningful topics.
- Rename `…/normal/` to `…/editor/`.
  - Move or merge `…/visual/*` and `…/insert/*` tests into here where
    appropriate.
- Rename `…/eval/` to `…/vimscript/`.
  - Move `…/viml/*` into here also.

* test(reorg): insert/* =&gt; editor/mode_insert_spec.lua
* test(reorg): cmdline/* =&gt; editor/mode_cmdline_spec.lua
* test(reorg): eval core tests =&gt; eval_spec.lua</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Subdirectories like "visual", "insert", "normal" encourage people to
separate *related* tests for no good reason.  Typically the _mode_ is
not the relevant topic of a test (and when it is, _then_ create
an appropriate describe() or it()).

Solution:
- Delete the various `test/functional/&lt;mode&gt;/` subdirectories, move
  their tests to more meaningful topics.
- Rename `…/normal/` to `…/editor/`.
  - Move or merge `…/visual/*` and `…/insert/*` tests into here where
    appropriate.
- Rename `…/eval/` to `…/vimscript/`.
  - Move `…/viml/*` into here also.

* test(reorg): insert/* =&gt; editor/mode_insert_spec.lua
* test(reorg): cmdline/* =&gt; editor/mode_cmdline_spec.lua
* test(reorg): eval core tests =&gt; eval_spec.lua</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.2.0404: writefile() error does not give a hint</title>
<updated>2021-09-15T21:57:54+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2021-08-02T14:27:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=ba34afb37849a8bdf5d601ced7f3c139a80cd396'/>
<id>ba34afb37849a8bdf5d601ced7f3c139a80cd396</id>
<content type='text'>
Problem:    Writefile() error does not give a hint.
Solution:   Add remark about first argument.
https://github.com/vim/vim/commit/18a2b87ca27c378a555b20f14a284d2ce3511427
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Writefile() error does not give a hint.
Solution:   Add remark about first argument.
https://github.com/vim/vim/commit/18a2b87ca27c378a555b20f14a284d2ce3511427
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.0735: cannot handle binary data</title>
<updated>2021-09-15T20:19:22+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2020-11-18T03:11:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=9095101743b2606fb1d5f7a5a1216f22d2fb2b4a'/>
<id>9095101743b2606fb1d5f7a5a1216f22d2fb2b4a</id>
<content type='text'>
Problem:    Cannot handle binary data.
Solution:   Add the Blob type. (Yasuhiro Matsumoto, closes vim/vim#3638)
https://github.com/vim/vim/commit/6e5ea8d2a995b32bbc5972edc4f827b959f2702f

Nvim-specific Blob conversions are implemented in future commits.

Refactor write_blob() to use a FileDescriptor, as f_writefile() was
refactored to use one (does not apply to read_blob()).

Use var_check_lock() in f_add() for Blobs from v8.1.0897.

Add a modeline to test_blob.vim and fix some doc typos.

Include if_perl.txt's VIM::Blob() documentation. Interestingly, this
function already worked before this port, as it just returns a Blob
string literal, not an actual Blob object.

N/A patches for version.c:

vim-patch:8.1.0741: viminfo with Blob is not tested

Problem:    Viminfo with Blob is not tested.
Solution:   Extend the viminfo test.  Fix reading a blob.  Fixed storing a
            special variable value.
https://github.com/vim/vim/commit/8c8b8bb56c724cc1bfc3d8520eec33f2d399697c

vim-patch:8.1.1022: may use NULL pointer when out of memory

Problem:    May use NULL pointer when out of memory. (Coverity)
Solution:   Check for blob_alloc() returning NULL.
https://github.com/vim/vim/commit/e142a9467a7f6845a426d8db6efedf246d3c13ac
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Cannot handle binary data.
Solution:   Add the Blob type. (Yasuhiro Matsumoto, closes vim/vim#3638)
https://github.com/vim/vim/commit/6e5ea8d2a995b32bbc5972edc4f827b959f2702f

Nvim-specific Blob conversions are implemented in future commits.

Refactor write_blob() to use a FileDescriptor, as f_writefile() was
refactored to use one (does not apply to read_blob()).

Use var_check_lock() in f_add() for Blobs from v8.1.0897.

Add a modeline to test_blob.vim and fix some doc typos.

Include if_perl.txt's VIM::Blob() documentation. Interestingly, this
function already worked before this port, as it just returns a Blob
string literal, not an actual Blob object.

N/A patches for version.c:

vim-patch:8.1.0741: viminfo with Blob is not tested

Problem:    Viminfo with Blob is not tested.
Solution:   Extend the viminfo test.  Fix reading a blob.  Fixed storing a
            special variable value.
https://github.com/vim/vim/commit/8c8b8bb56c724cc1bfc3d8520eec33f2d399697c

vim-patch:8.1.1022: may use NULL pointer when out of memory

Problem:    May use NULL pointer when out of memory. (Coverity)
Solution:   Check for blob_alloc() returning NULL.
https://github.com/vim/vim/commit/e142a9467a7f6845a426d8db6efedf246d3c13ac
</pre>
</div>
</content>
</entry>
<entry>
<title>eval: add v:_null_string</title>
<updated>2021-04-09T02:36:20+00:00</updated>
<author>
<name>Jan Edmund Lazo</name>
<email>jan.lazo@mail.utoronto.ca</email>
</author>
<published>2021-04-09T02:33:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=0d0eeff8a34b01db93fb271fbeac3ad2d372a0e0'/>
<id>0d0eeff8a34b01db93fb271fbeac3ad2d372a0e0</id>
<content type='text'>
Replacement for Vim's test_null_string().
Vim uses it to verify that its codebase handles null strings.
Preparation for the Test_null_list() in patch v8.2.1822.

Use v:_null_string, not non-existent env var, for null string tests.

Mention v:_null_string in id() because id(v:_null_string) returns (nil).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replacement for Vim's test_null_string().
Vim uses it to verify that its codebase handles null strings.
Preparation for the Test_null_list() in patch v8.2.1822.

Use v:_null_string, not non-existent env var, for null string tests.

Mention v:_null_string in id() because id(v:_null_string) returns (nil).
</pre>
</div>
</content>
</entry>
<entry>
<title>test: update writefile test for invalid list items</title>
<updated>2018-06-24T20:22:16+00:00</updated>
<author>
<name>Jan Edmund Lazo</name>
<email>janedmundlazo@hotmail.com</email>
</author>
<published>2018-06-22T13:44:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=14b3741ec5410c4dc1b71950d1994f24c7a9744a'/>
<id>14b3741ec5410c4dc1b71950d1994f24c7a9744a</id>
<content type='text'>
It validates list items with tv_check_str_on_nr()
to catch invalid types (ex. E745, E805).
If there is an invalid item, it does not write to the file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It validates list items with tv_check_str_on_nr()
to catch invalid types (ex. E745, E805).
If there is an invalid item, it does not write to the file.
</pre>
</div>
</content>
</entry>
<entry>
<title>eval: Add s flag, use p_fs by default, error out on unknown flag</title>
<updated>2017-04-02T23:11:27+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2017-04-02T23:11:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=97a7f4745dd1d75cd176dede1a4430bc4e28f8f7'/>
<id>97a7f4745dd1d75cd176dede1a4430bc4e28f8f7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>eval: Fix error messages from writefile</title>
<updated>2017-02-14T17:46:12+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2017-02-14T17:46:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f489827b5f9b8b1ecd684768a92871389217aa91'/>
<id>f489827b5f9b8b1ecd684768a92871389217aa91</id>
<content type='text'>
1. When calling writefile(list, fname, []) do not show error message twice.
2. Do not allow file name to be overwritten for writefile([1], 2).
3. Do not show “Can’t open file with an empty name” error after error like 
   “using Float as a String” when type of the second argument is not correct.
4. Do not give multiple error messages and still continue for code like 
   `writefile(["test", [], [], [], "tset"])`.

Note that to fix 4. ideally I need tv_check_str_or_nr which is currently present 
in two PRs: #6114 and #5119. I would want to avoid copying this function into 
a yet another PR.

Ref vim/vim#1476.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. When calling writefile(list, fname, []) do not show error message twice.
2. Do not allow file name to be overwritten for writefile([1], 2).
3. Do not show “Can’t open file with an empty name” error after error like 
   “using Float as a String” when type of the second argument is not correct.
4. Do not give multiple error messages and still continue for code like 
   `writefile(["test", [], [], [], "tset"])`.

Note that to fix 4. ideally I need tv_check_str_or_nr which is currently present 
in two PRs: #6114 and #5119. I would want to avoid copying this function into 
a yet another PR.

Ref vim/vim#1476.</pre>
</div>
</content>
</entry>
<entry>
<title>eval: writefile: Give more adequate IO errors and do not call putc()</title>
<updated>2017-02-13T22:10:31+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2016-07-31T17:13:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=fe0eecf9cc9a9290cc67168779edc101e59d77eb'/>
<id>fe0eecf9cc9a9290cc67168779edc101e59d77eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
