<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/unit, branch v0.2.1</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: avoid extra clear() calls</title>
<updated>2017-10-01T23:46:16+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2017-10-01T22:24:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=6f7754dfa0c6a9ec2a1e7db3685ffd41b207b882'/>
<id>6f7754dfa0c6a9ec2a1e7db3685ffd41b207b882</id>
<content type='text'>
also: various other cleanup
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
also: various other cleanup
</pre>
</div>
</content>
</entry>
<entry>
<title>win: vim_FullName(): force backslashes #7287</title>
<updated>2017-10-01T22:48:30+00:00</updated>
<author>
<name>Ignas Anikevicius</name>
<email>anikevicius@gmail.com</email>
</author>
<published>2017-09-18T18:06:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=2b133101cf67b523c2503ef715dfb9ebfa732da2'/>
<id>2b133101cf67b523c2503ef715dfb9ebfa732da2</id>
<content type='text'>
- Replace obvious cases of '/' literal with PATHSEP. (There are still
  some remaining cases that need closer inspection.)
- Fixup tests: ui/screen_basic

closes #7117
ref https://github.com/neovim/neovim/issues/2471#issuecomment-271193714
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Replace obvious cases of '/' literal with PATHSEP. (There are still
  some remaining cases that need closer inspection.)
- Fixup tests: ui/screen_basic

closes #7117
ref https://github.com/neovim/neovim/issues/2471#issuecomment-271193714
</pre>
</div>
</content>
</entry>
<entry>
<title>os_stat: return ENOENT on NULL filename arg</title>
<updated>2017-08-09T22:56:07+00:00</updated>
<author>
<name>James McCoy</name>
<email>jamessan@jamessan.com</email>
</author>
<published>2017-08-08T20:18:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=ac055d677aa9eff9fca11cecb5ac7f7a4edb0265'/>
<id>ac055d677aa9eff9fca11cecb5ac7f7a4edb0265</id>
<content type='text'>
Closes #4370

Explication:

    In the backtrace in #4370, we see that `buf_write()` was called with
    non-NULL `fname` and `sfname` arguments, but they've since _become_
    NULL.

    #7  0x00000000004de09d in buf_write (buf=0x1dee040, fname=0x0, fname@entry=0x1e985b0 "/home/sean/src/github.com/snczl/virta/pkg/meld/segment.go",
                                         sfname=0x0, sfname@entry=0x1ddfa60 "segment.go", start=1, end=72, eap=eap@entry=0x7ffc6b032e60, append=0,
                                         forceit=0, reset_changed=1, filtering=0)
    at /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/fileio.c:2576

    This is most likely due to the code that restores those values from
    `buf`, which happens just before the fatal call to `os_fileinfo`

    ```c
        /*
         * The autocommands may have changed the name of the buffer, which may
         * be kept in fname, ffname and sfname.
         */
        if (buf_ffname)
          ffname = buf-&gt;b_ffname;
        if (buf_sfname)
          sfname = buf-&gt;b_sfname;
        if (buf_fname_f)
          fname = buf-&gt;b_ffname;
        if (buf_fname_s)
          fname = buf-&gt;b_sfname;
    ```

    It's worth noting that at this point `ffname` is still non-NULL, so
    it _could_ be used.  However, our current code is purely more strict
    than Vim in this area, which has caused us problems before (e.g.,
    `getdigits()`).  The commentary for `struct file_buffer` clearly
    indicate that all of `b_ffname`, `b_sfname`, and `b_fname` may be
    NULL:

    ```c
      /*
       * b_ffname has the full path of the file (NULL for no name).
       * b_sfname is the name as the user typed it (or NULL).
       * b_fname is the same as b_sfname, unless ":cd" has been done,
       *		then it is the same as b_ffname (NULL for no name).
       */
      char_u      *b_ffname;        /* full path file name */
      char_u      *b_sfname;        /* short file name */
      char_u      *b_fname;         /* current file name */
    ```

    Vim directly calls `stat(2)` which, although it is annotated to tell
    the compiler that the path argument is non-NULL, does handle a NULL
    pointer by returning a `-1` value and setting `errno` to `EFAULT`.
    This satisfies Vim's check, since it treats any `-1` return from
    `stat(2)` to mean the file doesn't exist (at least in this code
    path).

    Note that Vim's mch_stat() implementations on win32 and solaris
    clearly cannot accept NULL `name`. But the codepaths that call
    mch_stat will NULL `name` tend to be unix-only (eg: u_read_undo)!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #4370

Explication:

    In the backtrace in #4370, we see that `buf_write()` was called with
    non-NULL `fname` and `sfname` arguments, but they've since _become_
    NULL.

    #7  0x00000000004de09d in buf_write (buf=0x1dee040, fname=0x0, fname@entry=0x1e985b0 "/home/sean/src/github.com/snczl/virta/pkg/meld/segment.go",
                                         sfname=0x0, sfname@entry=0x1ddfa60 "segment.go", start=1, end=72, eap=eap@entry=0x7ffc6b032e60, append=0,
                                         forceit=0, reset_changed=1, filtering=0)
    at /home/travis/build/neovim/bot-ci/build/neovim/src/nvim/fileio.c:2576

    This is most likely due to the code that restores those values from
    `buf`, which happens just before the fatal call to `os_fileinfo`

    ```c
        /*
         * The autocommands may have changed the name of the buffer, which may
         * be kept in fname, ffname and sfname.
         */
        if (buf_ffname)
          ffname = buf-&gt;b_ffname;
        if (buf_sfname)
          sfname = buf-&gt;b_sfname;
        if (buf_fname_f)
          fname = buf-&gt;b_ffname;
        if (buf_fname_s)
          fname = buf-&gt;b_sfname;
    ```

    It's worth noting that at this point `ffname` is still non-NULL, so
    it _could_ be used.  However, our current code is purely more strict
    than Vim in this area, which has caused us problems before (e.g.,
    `getdigits()`).  The commentary for `struct file_buffer` clearly
    indicate that all of `b_ffname`, `b_sfname`, and `b_fname` may be
    NULL:

    ```c
      /*
       * b_ffname has the full path of the file (NULL for no name).
       * b_sfname is the name as the user typed it (or NULL).
       * b_fname is the same as b_sfname, unless ":cd" has been done,
       *		then it is the same as b_ffname (NULL for no name).
       */
      char_u      *b_ffname;        /* full path file name */
      char_u      *b_sfname;        /* short file name */
      char_u      *b_fname;         /* current file name */
    ```

    Vim directly calls `stat(2)` which, although it is annotated to tell
    the compiler that the path argument is non-NULL, does handle a NULL
    pointer by returning a `-1` value and setting `errno` to `EFAULT`.
    This satisfies Vim's check, since it treats any `-1` return from
    `stat(2)` to mean the file doesn't exist (at least in this code
    path).

    Note that Vim's mch_stat() implementations on win32 and solaris
    clearly cannot accept NULL `name`. But the codepaths that call
    mch_stat will NULL `name` tend to be unix-only (eg: u_read_undo)!
</pre>
</div>
</content>
</entry>
<entry>
<title>os/fileio: Add ability to use os/fileio.c for file descriptors</title>
<updated>2017-07-04T15:37:01+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2017-07-04T14:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=72b3fd96642e7b2c268e17953de3b2ed995eb3b4'/>
<id>72b3fd96642e7b2c268e17953de3b2ed995eb3b4</id>
<content type='text'>
Code imported from #6299
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Code imported from #6299
</pre>
</div>
</content>
</entry>
<entry>
<title>os/fileio: Add msgpack_file_write function</title>
<updated>2017-07-04T15:37:01+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2017-07-04T14:03:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=5ab9e9f617934fae8f85ceb6db398dbf1e93471d'/>
<id>5ab9e9f617934fae8f85ceb6db398dbf1e93471d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge #6947 from ZyX-I/consistent-get_keymap</title>
<updated>2017-07-03T21:33:08+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2017-07-03T21:33:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=008b604bacbbeeaf0e04f94b1d331b11ebec631a'/>
<id>008b604bacbbeeaf0e04f94b1d331b11ebec631a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>unittests: Fix allocation ordering for tv_dict_add_str()</title>
<updated>2017-07-02T17:24:39+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2017-07-02T17:18:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=35898cff5d1d6dc60e0d7b87bfe106539453b031'/>
<id>35898cff5d1d6dc60e0d7b87bfe106539453b031</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: expand_env_esc: Pass correct buffer size for outlen and assertion</title>
<updated>2017-07-02T16:52:43+00:00</updated>
<author>
<name>James McCoy</name>
<email>jamessan@jamessan.com</email>
</author>
<published>2017-07-02T16:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=4d017256996fe7c7e19944f78c67d9fcb156ada7'/>
<id>4d017256996fe7c7e19944f78c67d9fcb156ada7</id>
<content type='text'>
Running this test with a mocked passwd file whose $HOME was set to
/home/jamessan/src/debian.org/pkg-vim/deb-packages/neovim/neovim-0.2.0/debian/fakehome
caused the test to fail, since the expanded result was &gt;= 99 bytes.  The
test should be reflecting the actual size of the buffer, instead of some
arbitrary other number, anwyay.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Running this test with a mocked passwd file whose $HOME was set to
/home/jamessan/src/debian.org/pkg-vim/deb-packages/neovim/neovim-0.2.0/debian/fakehome
caused the test to fail, since the expanded result was &gt;= 99 bytes.  The
test should be reflecting the actual size of the buffer, instead of some
arbitrary other number, anwyay.
</pre>
</div>
</content>
</entry>
<entry>
<title>eval/typval: Add tv_dict_add_allocated_str() function</title>
<updated>2017-07-02T16:01:09+00:00</updated>
<author>
<name>ZyX</name>
<email>kp-pav@yandex.ru</email>
</author>
<published>2017-07-02T16:01:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=df040e55fbd3edc5a36462af927a7194d079d0b8'/>
<id>df040e55fbd3edc5a36462af927a7194d079d0b8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: fix bashisms (#6791)</title>
<updated>2017-05-31T22:46:00+00:00</updated>
<author>
<name>Jonathan de Boyne Pollard</name>
<email>jdebp@users.noreply.github.com</email>
</author>
<published>2017-05-31T22:46:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=838277e28a6c8ea600a49292cd2837b155265dc6'/>
<id>838277e28a6c8ea600a49292cd2837b155265dc6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
