Skip to content

Commit d0f7b66

Browse files
authored
Merge pull request #1577 from vim-jp/hh-update-testing
Update testing.{txt,jax}
2 parents fb20a8a + 2f4372c commit d0f7b66

File tree

2 files changed

+130
-18
lines changed

2 files changed

+130
-18
lines changed

doc/testing.jax

Lines changed: 67 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*testing.txt* For Vim バージョン 9.1. Last change: 2024 May 05
1+
*testing.txt* For Vim バージョン 9.1. Last change: 2024 Jun 06
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -45,12 +45,16 @@ test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()*
4545

4646
|method| としても使用できる: >
4747
GetAllocId()->test_alloc_fail()
48+
<
49+
戻り値の型: |Number|
4850

4951

5052
test_autochdir() *test_autochdir()*
5153
Vimの起動が完了する前に 'autochdir' の効果を有効にするためのフ
5254
ラグをセットする。
5355

56+
戻り値の型: |Number|
57+
5458

5559
test_feedinput({string}) *test_feedinput()*
5660
{string} の文字を、あたかもユーザーがタイプしたかのように処理
@@ -59,6 +63,8 @@ test_feedinput({string}) *test_feedinput()*
5963

6064
|method| としても使用できる: >
6165
GetText()->test_feedinput()
66+
<
67+
戻り値の型: |Number|
6268

6369

6470
test_garbagecollect_now() *test_garbagecollect_now()*
@@ -69,10 +75,13 @@ test_garbagecollect_now() *test_garbagecollect_now()*
6975
これは、スタック上の変数が解放されるため、:def 関数から呼び出
7076
された場合には動作しない。
7177

78+
戻り値の型: |Number|
79+
7280
test_garbagecollect_soon() *test_garbagecollect_soon()*
7381
あたかもメインループの中にいるように、ガーベッジコレクトを呼び
7482
出すためのフラグを設定する。テストでのみ使用される。
7583

84+
戻り値の型: |Number|
7685

7786
test_getvalue({name}) *test_getvalue()*
7887
内部変数の値を取得する。{name} のこれらの値がサポートされてい
@@ -82,6 +91,8 @@ test_getvalue({name}) *test_getvalue()*
8291
|method| としても使用できる: >
8392
GetName()->test_getvalue()
8493
<
94+
戻り値の型: |Number|
95+
8596
*test_gui_event()*
8697
test_gui_event({event}, {args})
8798
機能テストしているVimで GUI のイベント {event} を引数 {args}
@@ -207,8 +218,9 @@ test_gui_event({event}, {args})
207218

208219
|method| としても使用できる: >
209220
GetEvent()->test_gui_event({args})
210-
211221
<
222+
戻り値の型: |vim9-boolean|
223+
212224
test_ignore_error({expr}) *test_ignore_error()*
213225
{expr} を含むすべてのエラーを無視する。代わりに通常メッセージ
214226
が表示される。
@@ -221,7 +233,8 @@ test_ignore_error({expr}) *test_ignore_error()*
221233

222234
|method| としても使用できる: >
223235
GetErrorText()->test_ignore_error()
224-
236+
<
237+
戻り値の型: |Number|
225238

226239
test_mswin_event({event}, {args}) *test_mswin_event()*
227240
Vim の機能をテストするために、引数 {args} で低レベルの
@@ -310,40 +323,49 @@ test_mswin_event({event}, {args}) *test_mswin_event()*
310323
|method| としても使用できる: >
311324
GetEvent()->test_mswin_event({args})
312325
<
326+
戻り値の型: |vim9-boolean|
313327

314328
test_null_blob() *test_null_blob()*
315329
null の |Blob| を返す。これはテストのみに使われる。
316330

331+
戻り値の型: |Blob|
317332

318333
test_null_channel() *test_null_channel()*
319334
null の |Channel| を返す。これはテストのみに使われる。
320335
{|+channel| 機能つきでコンパイルされたときのみ有効}
321336

337+
戻り値の型: |Channel|
322338

323339
test_null_dict() *test_null_dict()*
324340
null の |Dict| を返す。これはテストのみに使われる。
325341

342+
戻り値の型: dict<any>
326343

327344
test_null_function() *test_null_function()*
328345
null の |Funcref| を返す。これはテストのみに使われる。
329346

347+
戻り値の型: func(...): unknown
330348

331349
test_null_job() *test_null_job()*
332350
null の |Job| を返す。これはテストのみに使われる。
333351
{|+job| 機能つきでコンパイルされたときのみ有効}
334352

353+
戻り値の型: |job|
335354

336355
test_null_list() *test_null_list()*
337356
null の |List| を返す。これはテストのみに使われる。
338357

358+
戻り値の型: list<any>
339359

340360
test_null_partial() *test_null_partial()*
341361
null の |Partial| を返す。これはテストのみに使われる。
342362

363+
戻り値の型: func(...): unknown
343364

344365
test_null_string() *test_null_string()*
345366
null の |String| を返す。これはテストのみに使われる。
346367

368+
戻り値の型: |String|
347369

348370
test_option_not_set({name}) *test_option_not_set()*
349371
オプション {name} が設定されたことを示すフラグをリセットする。
@@ -357,7 +379,8 @@ test_option_not_set({name}) *test_option_not_set()*
357379

358380
|method| としても使用できる: >
359381
GetOptionName()->test_option_not_set()
360-
382+
<
383+
戻り値の型: |Number|
361384

362385
test_override({name}, {val}) *test_override()*
363386
テストを実行できるようにするため、Vimの内部処理の特定の部分を
@@ -413,22 +436,26 @@ test_override({name}, {val}) *test_override()*
413436
414437
< |method| としても使用できる: >
415438
GetOverrideVal()-> test_override('starting')
416-
439+
<
440+
戻り値の型: |Number|
417441

418442
test_refcount({expr}) *test_refcount()*
419443
{expr} の参照カウントを返す。{expr} が参照カウントを持たない型
420444
の場合は、-1 を返す。この関数はテスト用。
421445

422446
|method| としても使用できる: >
423447
GetVarname()->test_refcount()
424-
448+
<
449+
戻り値の型: |Number|
425450

426451
test_setmouse({row}, {col}) *test_setmouse()*
427452
次のマウス操作に使用するマウス位置を設定する。
428453
{row}{col} は 1ベースである。
429454
例: >
430455
call test_setmouse(4, 20)
431456
call feedkeys("\<LeftMouse>", "xt")
457+
<
458+
戻り値の型: |Number|
432459

433460

434461
test_settime({expr}) *test_settime()*
@@ -441,20 +468,25 @@ test_settime({expr}) *test_settime()*
441468

442469
|method| としても使用できる: >
443470
GetTime()->test_settime()
444-
471+
<
472+
戻り値の型: |Number|
445473

446474
test_srand_seed([{seed}]) *test_srand_seed()*
447475
{seed} が渡されたときは `srand()` で使われる種の値を設定する。
448476
省略されたときはテスト用の種を削除する。
449477

478+
戻り値の型: |Number|
450479

451480
test_unknown() *test_unknown()*
452481
unknown型の値を返す。これはテストのみに使われる。
453482

483+
戻り値の型: unknown
454484

455485
test_void() *test_void()*
456486
void型の値を返す。これはテストのみに使われる。
457487

488+
戻り値の型: unknown
489+
458490
==============================================================================
459491
3. Assert関数 *assert-functions-details*
460492

@@ -467,6 +499,8 @@ assert_beeps({cmd}) *assert_beeps()*
467499
|method| としても使用できる: >
468500
GetCmd()->assert_beeps()
469501
<
502+
戻り値の型: |Number|
503+
470504
*assert_equal()*
471505
assert_equal({expected}, {actual} [, {msg}])
472506
{expected}{actual}が等しくない場合、|v:errors|にエラーメッセ
@@ -485,8 +519,10 @@ assert_equal({expected}, {actual} [, {msg}])
485519

486520
|method| としても使用でき、ベースは第2引数として渡される: >
487521
mylist->assert_equal([1, 2, 3])
522+
<
523+
戻り値の型: |Number|
488524

489-
< *assert_equalfile()*
525+
*assert_equalfile()*
490526
assert_equalfile({fname-one}, {fname-two} [, {msg}])
491527
ファイル {fname-one} および {fname-two} がまったく同じテキスト
492528
でない場合、|v:errors| にエラーメッセージが追加される。
@@ -497,6 +533,8 @@ assert_equalfile({fname-one}, {fname-two} [, {msg}])
497533

498534
|method| としても使用できる: >
499535
GetLog()->assert_equalfile('expected.log')
536+
<
537+
戻り値の型: |Number|
500538

501539
assert_exception({error} [, {msg}]) *assert_exception()*
502540
v:exception に{error}が含まれていない時、|v:errors|にエラーメッ
@@ -510,6 +548,8 @@ assert_exception({error} [, {msg}]) *assert_exception()*
510548
call assert_exception('E492:')
511549
endtry
512550
<
551+
戻り値の型: |Number|
552+
513553
*assert_fails()*
514554
assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
515555
{cmd}を実行しエラーを生成しなかった場合か、エラーメッセージの
@@ -550,6 +590,8 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
550590

551591
|method| としても使用できる: >
552592
GetCmd()->assert_fails('E99:')
593+
<
594+
戻り値の型: |Number|
553595

554596
assert_false({actual} [, {msg}]) *assert_false()*
555597
|assert_equal()|と同様に、{actual}がfalseでない場合、|v:errors|
@@ -563,6 +605,8 @@ assert_false({actual} [, {msg}]) *assert_false()*
563605

564606
|method| としても使用できる: >
565607
GetResult()->assert_false()
608+
<
609+
戻り値の型: |Number|
566610

567611
assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
568612
これは数値または |Float| の値をテストする。{actual}{lower}
@@ -571,6 +615,8 @@ assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()*
571615
エラーは "Expected range {lower} - {upper}, but got {actual}"
572616
という形式である。{msg} が存在する場合は、その前に置かれる。
573617

618+
戻り値の型: |Number|
619+
574620
*assert_match()*
575621
assert_match({pattern}, {actual} [, {msg}])
576622
{pattern}{actual}と一致しない場合、|v:errors|にエラーメッセー
@@ -595,6 +641,8 @@ assert_match({pattern}, {actual} [, {msg}])
595641
|method| としても使用できる: >
596642
getFile()->assert_match('foo.*')
597643
<
644+
戻り値の型: |Number|
645+
598646
assert_nobeep({cmd}) *assert_nobeep()*
599647
{cmd} を実行し、それがビープもしくはビジュアルベルを発生させた
600648
場合、|v:errors| にエラーメッセージを追加する。
@@ -603,6 +651,8 @@ assert_nobeep({cmd}) *assert_nobeep()*
603651
|method| としても使用できる: >
604652
GetCmd()->assert_nobeep()
605653
<
654+
戻り値の型: |Number|
655+
606656
*assert_notequal()*
607657
assert_notequal({expected}, {actual} [, {msg}])
608658
`assert_equal()` の反対: {expected}{actual}が等しいときにエ
@@ -611,23 +661,28 @@ assert_notequal({expected}, {actual} [, {msg}])
611661

612662
|method| としても使用できる: >
613663
mylist->assert_notequal([1, 2, 3])
664+
<
665+
戻り値の型: |Number|
614666

615-
< *assert_notmatch()*
667+
*assert_notmatch()*
616668
assert_notmatch({pattern}, {actual} [, {msg}])
617669
`assert_match()` の反対: {pattern}{actual}にマッチするときに
618670
|v:errors| にエラーメッセージを追加する。
619671
|assert-return| も参照。
620672

621673
|method| としても使用できる: >
622674
getFile()->assert_notmatch('bar.*')
623-
675+
<
676+
戻り値の型: |Number|
624677

625678
assert_report({msg}) *assert_report()*
626679
テストの失敗を文字列 {msg} を使って直接報告する。
627680
常に 1 を返す。
628681

629682
|method| としても使用できる: >
630683
GetMessage()->assert_report()
684+
<
685+
戻り値の型: |Number|
631686

632687

633688
assert_true({actual} [, {msg}]) *assert_true()*
@@ -641,5 +696,7 @@ assert_true({actual} [, {msg}]) *assert_true()*
641696
|method| としても使用できる: >
642697
GetResult()->assert_true()
643698
<
699+
戻り値の型: |Number|
700+
644701

645702
vim:tw=78:ts=8:noet:ft=help:norl:

0 commit comments

Comments
 (0)