Skip to content

Update {testing,tagsrch}.{txt,jax} #911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions doc/tagsrch.jax
Original file line number Diff line number Diff line change
Expand Up @@ -877,19 +877,25 @@ CTRL-W d 新しいウィンドウを開き、カーソルの下にあったキ

タグリストの生成に使用される関数は、'tagfunc' オプションを設定することによって
指定される。関数は3つの引数で呼び出される:
a:pattern タグ検索中に使用されたタグ識別子
a:flags 関数の挙動を制御するためのフラグのリスト
a:pattern タグ検索中に使用されたタグ識別子もしくはパターン
a:flags 関数の挙動を制御するためのフラグを含む文字列
a:info 以下のエントリを含む辞書:
buf_ffname F優先順位のために使用できる完全ファイル名。
user_data カスタムデータ文字列。以前の tagfunc によっ
てタグスタックに格納されている場合。

現在、タグ関数には2つのフラグを渡すことができる:
現在、タグ関数には最大3つのフラグを渡すことができる:
'c' この関数は、処理中の通常のコマンドによって呼び出された。
(ニーモニック: タグ関数は、カーソルの周りのコンテキストを使用
して、タグリストを生成するためのより良い作業を実行できる。)
'i' 挿入モードで、ユーザーはタグを補完していた(|i_CTRL-X_CTRL-]|
で)
もしくは 'completeopt' が `t` を含む場合)
'r' tagfunc の最初の引数は、|pattern| (|tag-regexp| を参照) として
解釈され、使用時には: >
:tag /pat
< また挿入モードの補完時にも提供される。
このフラグが存在しない場合、引数は常に文字通りの完全なタグ名と
して扱われる。

Note 'tagfunc' が設定されている場合、|tag-priority| に記述されているタグの優先
順位は適用されない。代わりに、優先順位は、関数によって返されるリスト内の要素の
Expand Down
13 changes: 11 additions & 2 deletions doc/testing.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*testing.txt* For Vim バージョン 8.2. Last change: 2020 Dec 12
*testing.txt* For Vim バージョン 8.2. Last change: 2021 Apr 02


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -169,6 +169,7 @@ test_override({name}, {val}) *test_override()*
セージの最大3秒の待ち時間を上書きする。
term_props バージョン文字列が検出された場合、すべてのター
ミナルプロパティをリセットする。
uptime sysinfo.uptime を上書きする
ALL すべての置き換えをクリアする ({val} は使われない)

"starting" は、起動が完了したようにテストが振る舞うべきときに
Expand Down Expand Up @@ -242,7 +243,7 @@ test_srand_seed([seed]) *test_srand_seed()*
assert_beeps({cmd}) *assert_beeps()*
{cmd} を実行し、それがビープもしくはビジュアルベルを発生させな
かった場合、|v:errors| にエラーメッセージを追加する。
|assert_fails()| および |assert-return| も参照。
|assert_fails()|、|assert_nobeep()|、|assert-return| も参照。

|method| としても使用できる: >
GetCmd()->assert_beeps()
Expand Down Expand Up @@ -371,6 +372,14 @@ assert_match({pattern}, {actual} [, {msg}])

|method| としても使用できる: >
getFile()->assert_match('foo.*')
<
assert_nobeep({cmd}) *assert_nobeep()*
{cmd} を実行し、それがビープもしくはビジュアルベルを発生させた
場合、|v:errors| にエラーメッセージを追加する。
|assert_beeps()| も参照。

|method| としても使用できる: >
GetCmd()->assert_nobeep()
<
*assert_notequal()*
assert_notequal({expected}, {actual} [, {msg}])
Expand Down
14 changes: 10 additions & 4 deletions en/tagsrch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -888,19 +888,25 @@ like |CTRL-]|.

The function used for generating the taglist is specified by setting the
'tagfunc' option. The function will be called with three arguments:
a:pattern The tag identifier used during the tag search.
a:flags List of flags to control the function behavior.
a:pattern The tag identifier or pattern used during the tag search.
a:flags String containing flags to control the function behavior.
a:info Dict containing the following entries:
buf_ffname Full filename which can be used for priority.
user_data Custom data String, if stored in the tag
stack previously by tagfunc.

Currently two flags may be passed to the tag function:
Currently up to three flags may be passed to the tag function:
'c' The function was invoked by a normal command being processed
(mnemonic: the tag function may use the context around the
cursor to perform a better job of generating the tag list.)
'i' In Insert mode, the user was completing a tag (with
|i_CTRL-X_CTRL-]|).
|i_CTRL-X_CTRL-]| or 'completeopt' contains `t`).
'r' The first argument to tagfunc should be interpreted as a
|pattern| (see |tag-regexp|), such as when using: >
:tag /pat
< It is also given when completing in insert mode.
If this flag is not present, the argument is usually taken
literally as the full tag name.

Note that when 'tagfunc' is set, the priority of the tags described in
|tag-priority| does not apply. Instead, the priority is exactly as the
Expand Down
14 changes: 12 additions & 2 deletions en/testing.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2020 Dec 12
*testing.txt* For Vim version 8.2. Last change: 2021 Apr 02


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -168,6 +168,7 @@ test_override({name}, {val}) *test_override()*
wait time of up to 3 seconds for messages
term_props reset all terminal properties when the version
string is detected
uptime overrules sysinfo.uptime
ALL clear all overrides ({val} is not used)

"starting" is to be used when a test should behave like
Expand Down Expand Up @@ -242,7 +243,8 @@ test_srand_seed([seed]) *test_srand_seed()*
assert_beeps({cmd}) *assert_beeps()*
Run {cmd} and add an error message to |v:errors| if it does
NOT produce a beep or visual bell.
Also see |assert_fails()| and |assert-return|.
Also see |assert_fails()|, |assert_nobeep()| and
|assert-return|.

Can also be used as a |method|: >
GetCmd()->assert_beeps()
Expand Down Expand Up @@ -375,6 +377,14 @@ assert_match({pattern}, {actual} [, {msg}])

Can also be used as a |method|: >
getFile()->assert_match('foo.*')
<
assert_nobeep({cmd}) *assert_nobeep()*
Run {cmd} and add an error message to |v:errors| if it
produces a beep or visual bell.
Also see |assert_beeps()|.

Can also be used as a |method|: >
GetCmd()->assert_nobeep()
<
*assert_notequal()*
assert_notequal({expected}, {actual} [, {msg}])
Expand Down