<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/plugin/man_spec.lua, branch usermarks</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: simplify platform detection (#21020)</title>
<updated>2022-11-22T00:13:30+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2022-11-22T00:13:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=5eb5f4948826e9d47685ea9e257409cc3e693614'/>
<id>5eb5f4948826e9d47685ea9e257409cc3e693614</id>
<content type='text'>
Extend the capabilities of is_os to detect more platforms such as
freebsd and openbsd. Also remove `iswin()` helper function as it can be
replaced by `is_os("win")`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extend the capabilities of is_os to detect more platforms such as
freebsd and openbsd. Also remove `iswin()` helper function as it can be
replaced by `is_os("win")`.</pre>
</div>
</content>
</entry>
<entry>
<title>test: introduce skip() #21010</title>
<updated>2022-11-13T13:52:19+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2022-11-13T13:52:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=736c36c02f316c979da363c5120495179a2b6c2a'/>
<id>736c36c02f316c979da363c5120495179a2b6c2a</id>
<content type='text'>
This is essentially a convenience wrapper around the `pending()`
function, similar to `skip_fragile()` but more general-purpose.

Also remove `pending_win32` function as it can be replaced by
`skip(iswin())`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is essentially a convenience wrapper around the `pending()`
function, similar to `skip_fragile()` but more general-purpose.

Also remove `pending_win32` function as it can be replaced by
`skip(iswin())`.</pre>
</div>
</content>
</entry>
<entry>
<title>ci: add cirrus to isCI function to skip tests (#20526)</title>
<updated>2022-10-17T15:16:31+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2022-10-17T15:16:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=5046b4b4adb154bbdb50a5e96e29f777b5f807ac'/>
<id>5046b4b4adb154bbdb50a5e96e29f777b5f807ac</id>
<content type='text'>
The environment variable CIRRUS_CI is manually passed to RunTests.cmake
as it doesn't get passed when using cmake script mode.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The environment variable CIRRUS_CI is manually passed to RunTests.cmake
as it doesn't get passed when using cmake script mode.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(man): handle absolute paths as `:Man` targets (#20624)</title>
<updated>2022-10-17T09:37:44+00:00</updated>
<author>
<name>Mahmoud Al-Qudsi</name>
<email>mqudsi@neosmart.net</email>
</author>
<published>2022-10-17T09:37:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=39911d76be560c998cc7dee51c5d94f811164f66'/>
<id>39911d76be560c998cc7dee51c5d94f811164f66</id>
<content type='text'>
* fix(man): handle absolute paths as :Man targets

Previously, attempting to provide `:Man` with an absolute path as the name would
cause neovim to return the following error:

```
Error detected while processing command line:
/usr/local/share/nvim/runtime/lua/man.lua:690: /usr/local/share/nvim/runtime/lua/man.lua:683: Vim:E426: tag not found: nil(nil)
Press ENTER or type command to continue
```

..because it would try to validate the existence of a man page for the provided
name by executing `man -w /some/path` which (on at least some Linux machines
[0]) returns `/some/path` instead of the path to the nroff files that would be
formatted to satisfy the man(1) lookup.

While man pages are not normally named after absolute paths, users shouldn't be
blamed for trying. Given such a name/path, neovim would **not** complain that
the path didn't have a corresponding man file but would error out when trying
to call the tag function for the null-propagated name-and-section `nil(nil)`.
(The same underlying error existed before this function was ported to lua, but
did not exhibit the lua-specific `nil(nil)` name; instead a tag lookup for `()`
would fail and error out.)

With this patch, we detect the case where `man -w ...` returns the same value as
the provided name to not only prevent invoking the tag function for a
non-existent/malformed name+sect but also to properly report the non-existence
of a man page for the provided lookup (the absolute path).

While man(1) can be used to directly read an nroff-formatted document via `man
/path/to/nroff.doc`, `:Man /path/to/nroff.doc` never supported this behavior so
no functionality is lost in case the provided path _was_ an nroff file.

[0]: `man -w /absolute/path` returning `/absolute/path` observed on an Ubuntu
18.04 installation.

* test: add regression test for #20624

Add a functional test to `man_spec.lua` to check for a regression for #20624 by
first obtaining an absolute path to a random file and materializing it to disk,
then attempting to query `:Man` for an entry by that same name/path.

The test passes if nvim correctly reports that there is no man page
correspending to the provided name/path and fails if any other error (or no
error) is shown.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fix(man): handle absolute paths as :Man targets

Previously, attempting to provide `:Man` with an absolute path as the name would
cause neovim to return the following error:

```
Error detected while processing command line:
/usr/local/share/nvim/runtime/lua/man.lua:690: /usr/local/share/nvim/runtime/lua/man.lua:683: Vim:E426: tag not found: nil(nil)
Press ENTER or type command to continue
```

..because it would try to validate the existence of a man page for the provided
name by executing `man -w /some/path` which (on at least some Linux machines
[0]) returns `/some/path` instead of the path to the nroff files that would be
formatted to satisfy the man(1) lookup.

While man pages are not normally named after absolute paths, users shouldn't be
blamed for trying. Given such a name/path, neovim would **not** complain that
the path didn't have a corresponding man file but would error out when trying
to call the tag function for the null-propagated name-and-section `nil(nil)`.
(The same underlying error existed before this function was ported to lua, but
did not exhibit the lua-specific `nil(nil)` name; instead a tag lookup for `()`
would fail and error out.)

With this patch, we detect the case where `man -w ...` returns the same value as
the provided name to not only prevent invoking the tag function for a
non-existent/malformed name+sect but also to properly report the non-existence
of a man page for the provided lookup (the absolute path).

While man(1) can be used to directly read an nroff-formatted document via `man
/path/to/nroff.doc`, `:Man /path/to/nroff.doc` never supported this behavior so
no functionality is lost in case the provided path _was_ an nroff file.

[0]: `man -w /absolute/path` returning `/absolute/path` observed on an Ubuntu
18.04 installation.

* test: add regression test for #20624

Add a functional test to `man_spec.lua` to check for a regression for #20624 by
first obtaining an absolute path to a random file and materializing it to disk,
then attempting to query `:Man` for an entry by that same name/path.

The test passes if nvim correctly reports that there is no man page
correspending to the provided name/path and fails if any other error (or no
error) is shown.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(Man): port to Lua (#19912)</title>
<updated>2022-09-02T14:20:29+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2022-09-02T14:20:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2afcdbd63a5b0cbeaad9d83b096a3af5201c67a9'/>
<id>2afcdbd63a5b0cbeaad9d83b096a3af5201c67a9</id>
<content type='text'>
Co-authored-by: zeertzjq &lt;zeertzjq@outlook.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: zeertzjq &lt;zeertzjq@outlook.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>fix(exceptions): restore `did_throw` (#20000)</title>
<updated>2022-08-30T22:13:52+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2022-08-30T22:13:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=813476bf7291dfaf9fc0ef77c9f53a07258a3801'/>
<id>813476bf7291dfaf9fc0ef77c9f53a07258a3801</id>
<content type='text'>
`!did_throw` doesn't exactly imply `!current_exception`, as `did_throw = false`
is sometimes used to defer exception handling for later (without forgetting the
exception). E.g: uncaught exception handling in `do_cmdline()` may be deferred
to a different call (e.g: when `try_level &gt; 0`).

In #7881, `current_exception = NULL` in `do_cmdline()` is used as an analogue of
`did_throw = false`, but also causes the pending exception to be lost, which
also leaks as `discard_exception()` wasn't used.

It may be possible to fix this by saving/restoring `current_exception`, but
handling all of `did_throw`'s edge cases seems messier. Maybe not worth
diverging over.

This fix also uncovers a `man_spec.lua` bug on Windows: exceptions are thrown
due to Windows missing `man`, but they're lost; skip these tests if `man` isn't
executable.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`!did_throw` doesn't exactly imply `!current_exception`, as `did_throw = false`
is sometimes used to defer exception handling for later (without forgetting the
exception). E.g: uncaught exception handling in `do_cmdline()` may be deferred
to a different call (e.g: when `try_level &gt; 0`).

In #7881, `current_exception = NULL` in `do_cmdline()` is used as an analogue of
`did_throw = false`, but also causes the pending exception to be lost, which
also leaks as `discard_exception()` wasn't used.

It may be possible to fix this by saving/restoring `current_exception`, but
handling all of `did_throw`'s edge cases seems messier. Maybe not worth
diverging over.

This fix also uncovers a `man_spec.lua` bug on Windows: exceptions are thrown
due to Windows missing `man`, but they're lost; skip these tests if `man` isn't
executable.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(man.vim): q in "$MANPAGER mode" does not quit #18443</title>
<updated>2022-05-13T14:49:08+00:00</updated>
<author>
<name>Arsham Shirvani</name>
<email>arshamshirvani@gmail.com</email>
</author>
<published>2022-05-13T14:49:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f6ba7d69be2c57f80c9ee95276733e949aceb009'/>
<id>f6ba7d69be2c57f80c9ee95276733e949aceb009</id>
<content type='text'>
Problem:
q in "$MANPAGER mode" does not quit Nvim. This is because
ftplugin/man.vim creates its own mapping:
    nnoremap &lt;silent&gt; &lt;buffer&gt; &lt;nowait&gt; q :lclose&lt;CR&gt;&lt;C-W&gt;c
which overrides the one set by the autoload file when using :Man!
("$MANPAGER mode")

Solution:
Set b:pager during "$MANPAGER mode" so that ftplugin/man.vim can set the
mapping correctly.

Fixes #18281
Ref #17791

Helped-by: Gregory Anders &lt;8965202+gpanders@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
q in "$MANPAGER mode" does not quit Nvim. This is because
ftplugin/man.vim creates its own mapping:
    nnoremap &lt;silent&gt; &lt;buffer&gt; &lt;nowait&gt; q :lclose&lt;CR&gt;&lt;C-W&gt;c
which overrides the one set by the autoload file when using :Man!
("$MANPAGER mode")

Solution:
Set b:pager during "$MANPAGER mode" so that ftplugin/man.vim can set the
mapping correctly.

Fixes #18281
Ref #17791

Helped-by: Gregory Anders &lt;8965202+gpanders@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>tests/ui: remove unnecessary screen:detach()</title>
<updated>2019-10-13T20:10:42+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2019-10-13T18:18:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=4987311fb5b8f4a11d26995f71f5f402a9e2ace4'/>
<id>4987311fb5b8f4a11d26995f71f5f402a9e2ace4</id>
<content type='text'>
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.

This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).

Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.

This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).

Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/ui: cleanup illegitimate usages of "attr_ignore"</title>
<updated>2019-10-13T20:10:42+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2019-10-12T11:29:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a330129a280a34963e42d498f7cb1f53e6723e85'/>
<id>a330129a280a34963e42d498f7cb1f53e6723e85</id>
<content type='text'>
"attr_ignore" is an anti-pattern, with snapshot_util()
just include all the highlights already.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"attr_ignore" is an anti-pattern, with snapshot_util()
just include all the highlights already.
</pre>
</div>
</content>
</entry>
<entry>
<title>test/man_spec: remove plugin_helpers.reset()</title>
<updated>2019-08-05T02:51:49+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2019-08-05T02:51:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d4a0b6c4e1d78f19bf5879b113c5252d5a4f2e5c'/>
<id>d4a0b6c4e1d78f19bf5879b113c5252d5a4f2e5c</id>
<content type='text'>
The call to plugin_helpers.reset() is redundant with the clear() call
above it.  Probably just a copy-paste mistake.

Avoids exit_event race #8813.

Helped-by: Björn Linse &lt;bjorn.linse@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The call to plugin_helpers.reset() is redundant with the clear() call
above it.  Probably just a copy-paste mistake.

Avoids exit_event race #8813.

Helped-by: Björn Linse &lt;bjorn.linse@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
