Skip to content

Commit 1039cf0

Browse files
authored
Merge pull request #981 from tsuyoshicho/update/20211201/repeat-testing
Update {repeat,testing}.{txt.jax)
2 parents bd9108d + c45503c commit 1039cf0

File tree

4 files changed

+81
-30
lines changed

4 files changed

+81
-30
lines changed

doc/repeat.jax

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*repeat.txt* For Vim バージョン 8.2. Last change: 2021 Jun 11
1+
*repeat.txt* For Vim バージョン 8.2. Last change: 2021 Nov 24
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -781,6 +781,10 @@ NOTE: デバッグモードは未完成である。デバッグはVimの動作
781781

782782
デバッグモードのためのコマンドラインヒストリが別に用意されている。
783783

784+
NOTE: Vim9 script で、コマンドがスクリプトレベルで記述され次行へ継続するにあ
785+
たって、旧来のバックスラッシュを使わずに行継続されるときは、最初の行のみデバッ
786+
グ出力に表示される。
787+
784788
関数の行番号はその関数の始まりから数える。見ている行の番号を数えるのに苦労する
785789
場合はその関数の書かれたファイルを別のVimで開き、その関数の始まりを探しだし、
786790
"99j" を実行すること。"99" は実際の行番号に合わせて変えること。
@@ -831,6 +835,15 @@ NOTE: デバッグモードは未完成である。デバッグはVimの動作
831835
(どうすべきかがわかりにくいため)。
832836
- 同じ名前のExコマンドを使うにはコロンを付けること:
833837
":cont", ":next", ":finish" (省略時も)
838+
*vim9-debug*
839+
コンパイル済みの :def 関数をデバッグする場合、"step" はすべての命令ではなく、
840+
実行されるすべての行の前で停止する。これにより、ほとんどの場合は非コンパイル関
841+
数のように動作する。ローカル変数へのアクセスは制限されているが可能である: >
842+
echo varname
843+
しかし他にはあまりない。
844+
特定のバイトコード命令ではなく、通常のExコマンドのように実行されるコマンドを実
845+
行する場合、"step" はローカル変数を検査できるコンパイル済みコンテキストで1回、
846+
そしてコマンドを実行する直前に1回停止する。
834847

835848
バックトレースは、関数呼び出しの階層を表示する。例えば:
836849
>bt ~
@@ -871,8 +884,12 @@ NOTE: デバッグモードは未完成である。デバッグはVimの動作
871884
{expression} の評価結果が異なる値となるときに常にブレークする
872885
ブレークポイントを設定する。例: >
873886
:breakadd expr g:lnum
874-
875887
< これはグローバル変数の lnum が変化するときに常にブレークする。
888+
889+
評価中のエラーは抑制されるので、まだ存在しない変数の名前が使え
890+
る。これはまた、式に間違いがあっても何も気付けないということで
891+
もある。
892+
876893
Note: |script-variable| を監視する場合、スクリプトが切り替わっ
877894
たときにブレークする。これは、定義されたスクリプト内でのみ、そ
878895
のスクリプト変数が有効だからである。そしてそのスクリプトがいく

doc/testing.jax

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*testing.txt* For Vim バージョン 8.2. Last change: 2021 Jul 07
1+
*testing.txt* For Vim バージョン 8.2. Last change: 2021 Aug 15
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -46,6 +46,7 @@ test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()*
4646
|method| としても使用できる: >
4747
GetAllocId()->test_alloc_fail()
4848
49+
4950
test_autochdir() *test_autochdir()*
5051
Vimの起動が完了する前に 'autochdir' の効果を有効にするためのフ
5152
ラグをセットする。
@@ -59,6 +60,7 @@ test_feedinput({string}) *test_feedinput()*
5960
|method| としても使用できる: >
6061
GetText()->test_feedinput()
6162
63+
6264
test_garbagecollect_now() *test_garbagecollect_now()*
6365
garbagecollect() とほぼ同じであるが、この関数はガーベッジコレ
6466
クトを直ちに実行する。この関数を実行する場合は、構造体が内部に
@@ -82,15 +84,16 @@ test_getvalue({name}) *test_getvalue()*
8284
*test_gui_drop_files()*
8385
test_gui_drop_files({list}, {row}, {col}, {mods})
8486
{list} の1つ以上のファイルをウィンドウの {row}{col} 列にド
85-
ロップする。この関数は |drag-n-drop| 機能が存在するGUI版のVim
87+
ロップする。この関数は |drop_file| 機能が存在するGUI版の Vim
8688
でのみ動作する。
8789

8890
{mods} としてサポートされる値:
8991
0x4 Shift
9092
0x8 Alt
9193
0x10 Ctrl
92-
ファイルは引数リストに追加され、{list} の最初のファイルの編集
93-
がウィンドウで開始される。詳細は |drag-n-drop| を参照。
94+
ファイルは引数リスト |argument-list| に追加され、{list} の最初
95+
のファイルの編集がウィンドウで開始される。詳細は |drag-n-drop|
96+
を参照。
9497

9598
*test_gui_mouse_event()*
9699
test_gui_mouse_event({button}, {row}, {col}, {multiclick}, {modifiers})
@@ -131,6 +134,7 @@ test_ignore_error({expr}) *test_ignore_error()*
131134
|method| としても使用できる: >
132135
GetErrorText()->test_ignore_error()
133136
137+
134138
test_null_blob() *test_null_blob()*
135139
null の |Blob| を返す。これはテストのみに使われる。
136140

@@ -165,14 +169,6 @@ test_null_string() *test_null_string()*
165169
null の |String| を返す。これはテストのみに使われる。
166170

167171

168-
test_unknown() *test_unknown()*
169-
unknown型の値を返す。これはテストのみに使われる。
170-
171-
172-
test_void() *test_void()*
173-
void型の値を返す。これはテストのみに使われる。
174-
175-
176172
test_option_not_set({name}) *test_option_not_set()*
177173
オプション {name} が設定されたことを示すフラグをリセットする。
178174
したがって、それはまだデフォルト値を持っているように見える。次
@@ -224,6 +220,7 @@ test_override({name}, {val}) *test_override()*
224220
< |method| としても使用できる: >
225221
GetOverrideVal()-> test_override('starting')
226222
223+
227224
test_refcount({expr}) *test_refcount()*
228225
{expr} の参照カウントを返す。{expr} が参照カウントを持たない型
229226
の場合は、-1 を返す。この関数はテスト用。
@@ -253,13 +250,15 @@ test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
253250
|method| としても使用できる: >
254251
GetValue()->test_scrollbar('right', 0)
255252
253+
256254
test_setmouse({row}, {col}) *test_setmouse()*
257255
次のマウス操作に使用するマウス位置を設定する。
258256
{row}{col} は 1ベースである。
259257
例: >
260258
call test_setmouse(4, 20)
261259
call feedkeys("\<LeftMouse>", "xt")
262260
261+
263262
test_settime({expr}) *test_settime()*
264263
Vim が内部的に用いる時間を設定する。現在は history のタイムス
265264
タンプ、viminfo のタイムスタンプ、undo に使用されている。
@@ -271,10 +270,19 @@ test_settime({expr}) *test_settime()*
271270
|method| としても使用できる: >
272271
GetTime()->test_settime()
273272
273+
274274
test_srand_seed([seed]) *test_srand_seed()*
275275
[seed] が渡されたときは `srand()` で使われる種の値を設定する。
276276
省略されたときはテスト用の種を削除する。
277277

278+
279+
test_unknown() *test_unknown()*
280+
unknown型の値を返す。これはテストのみに使われる。
281+
282+
283+
test_void() *test_void()*
284+
void型の値を返す。これはテストのみに使われる。
285+
278286
==============================================================================
279287
3. Assert関数 *assert-functions-details*
280288

@@ -440,7 +448,7 @@ assert_notmatch({pattern}, {actual} [, {msg}])
440448
441449
442450
assert_report({msg}) *assert_report()*
443-
テストの失敗を {msg} を使って直接報告する。
451+
テストの失敗を文字列 {msg} を使って直接報告する。
444452
常に 1 を返す。
445453

446454
|method| としても使用できる: >

en/repeat.txt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*repeat.txt* For Vim version 8.2. Last change: 2021 Jun 11
1+
*repeat.txt* For Vim version 8.2. Last change: 2021 Nov 24
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -792,6 +792,10 @@ won't be very helpful.
792792

793793
There is a separate command-line history for debug mode.
794794

795+
NOTE: In Vim9 script, if a command is written at the script level and
796+
continues on the next line, not using the old way with a backslash for line
797+
continuation, only the first line is printed before the debugging prompt.
798+
795799
The line number for a function line is relative to the start of the function.
796800
If you have trouble figuring out where you are, edit the file that defines
797801
the function in another Vim, search for the start of the function and do
@@ -844,6 +848,16 @@ About the additional commands in debug mode:
844848
is reset (because it's not clear what you want to repeat).
845849
- When you want to use the Ex command with the same name, prepend a colon:
846850
":cont", ":next", ":finish" (or shorter).
851+
*vim9-debug*
852+
When debugging a compiled :def function, "step" will stop before every
853+
executed line, not every single instruction. Thus it works mostly like a not
854+
compiled function. Access to local variables is limited you can use: >
855+
echo varname
856+
But not much else.
857+
When executing a command that is not a specific bytecode instruction but
858+
executed like a normal Ex command, "step" will stop once in the compiled
859+
context, where local variables can be inspected, and once just before
860+
executing the command.
847861

848862
The backtrace shows the hierarchy of function calls, e.g.:
849863
>bt ~
@@ -883,8 +897,12 @@ DEFINING BREAKPOINTS
883897
Sets a breakpoint, that will break whenever the {expression}
884898
evaluates to a different value. Example: >
885899
:breakadd expr g:lnum
886-
887900
< Will break, whenever the global variable lnum changes.
901+
902+
Errors in evaluation are suppressed, you can use the name of a
903+
variable that does not exist yet. This also means you will
904+
not notice anything if the expression has a mistake.
905+
888906
Note if you watch a |script-variable| this will break
889907
when switching scripts, since the script variable is only
890908
valid in the script where it has been defined and if that

en/testing.txt

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*testing.txt* For Vim version 8.2. Last change: 2021 Jul 07
1+
*testing.txt* For Vim version 8.2. Last change: 2021 Aug 15
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -46,6 +46,7 @@ test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()*
4646
Can also be used as a |method|: >
4747
GetAllocId()->test_alloc_fail()
4848
49+
4950
test_autochdir() *test_autochdir()*
5051
Set a flag to enable the effect of 'autochdir' before Vim
5152
startup has finished.
@@ -59,6 +60,7 @@ test_feedinput({string}) *test_feedinput()*
5960
Can also be used as a |method|: >
6061
GetText()->test_feedinput()
6162
63+
6264
test_garbagecollect_now() *test_garbagecollect_now()*
6365
Like garbagecollect(), but executed right away. This must
6466
only be called directly to avoid any structure to exist
@@ -83,14 +85,14 @@ test_getvalue({name}) *test_getvalue()*
8385
test_gui_drop_files({list}, {row}, {col}, {mods})
8486
Drop one or more files in {list} in the window at {row}, {col}.
8587
This function only works when the GUI is running and the
86-
|drag-n-drop| feature is present.
87-
88+
|drop_file| feature is present.
89+
8890
The supported values for {mods} are:
8991
0x4 Shift
9092
0x8 Alt
9193
0x10 Ctrl
92-
The files are added to the argument list and the first file in
93-
{list} is edited in the window. See |drag-n-drop| for more
94+
The files are added to the |argument-list| and the first file
95+
in {list} is edited in the window. See |drag-n-drop| for more
9496
information.
9597

9698
*test_gui_mouse_event()*
@@ -132,6 +134,7 @@ test_ignore_error({expr}) *test_ignore_error()*
132134
Can also be used as a |method|: >
133135
GetErrorText()->test_ignore_error()
134136
137+
135138
test_null_blob() *test_null_blob()*
136139
Return a |Blob| that is null. Only useful for testing.
137140

@@ -166,13 +169,6 @@ test_null_string() *test_null_string()*
166169
Return a |String| that is null. Only useful for testing.
167170

168171

169-
test_unknown() *test_unknown()*
170-
Return a value with unknown type. Only useful for testing.
171-
172-
test_void() *test_void()*
173-
Return a value with void type. Only useful for testing.
174-
175-
176172
test_option_not_set({name}) *test_option_not_set()*
177173
Reset the flag that indicates option {name} was set. Thus it
178174
looks like it still has the default value. Use like this: >
@@ -224,6 +220,7 @@ test_override({name}, {val}) *test_override()*
224220
< Can also be used as a |method|: >
225221
GetOverrideVal()-> test_override('starting')
226222
223+
227224
test_refcount({expr}) *test_refcount()*
228225
Return the reference count of {expr}. When {expr} is of a
229226
type that does not have a reference count, returns -1. Only
@@ -253,13 +250,15 @@ test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
253250
Can also be used as a |method|: >
254251
GetValue()->test_scrollbar('right', 0)
255252
253+
256254
test_setmouse({row}, {col}) *test_setmouse()*
257255
Set the mouse position to be used for the next mouse action.
258256
{row} and {col} are one based.
259257
For example: >
260258
call test_setmouse(4, 20)
261259
call feedkeys("\<LeftMouse>", "xt")
262260
261+
263262
test_settime({expr}) *test_settime()*
264263
Set the time Vim uses internally. Currently only used for
265264
timestamps in the history, as they are used in viminfo, and
@@ -272,10 +271,19 @@ test_settime({expr}) *test_settime()*
272271
Can also be used as a |method|: >
273272
GetTime()->test_settime()
274273
274+
275275
test_srand_seed([seed]) *test_srand_seed()*
276276
When [seed] is given this sets the seed value used by
277277
`srand()`. When omitted the test seed is removed.
278278

279+
280+
test_unknown() *test_unknown()*
281+
Return a value with unknown type. Only useful for testing.
282+
283+
284+
test_void() *test_void()*
285+
Return a value with void type. Only useful for testing.
286+
279287
==============================================================================
280288
3. Assert functions *assert-functions-details*
281289

@@ -446,7 +454,7 @@ assert_notmatch({pattern}, {actual} [, {msg}])
446454
447455
448456
assert_report({msg}) *assert_report()*
449-
Report a test failure directly, using {msg}.
457+
Report a test failure directly, using String {msg}.
450458
Always returns one.
451459

452460
Can also be used as a |method|: >

0 commit comments

Comments
 (0)