File tests/misc/cmdline.c changed (mode: 100644) (index 3448dcae6..930696132) |
... |
... |
TEST(wild_inc_completion) |
658 |
658 |
cfg.wild_inc = matcher_alloc_glob(":plugin", &error); |
cfg.wild_inc = matcher_alloc_glob(":plugin", &error); |
659 |
659 |
assert_string_equal(NULL, error); |
assert_string_equal(NULL, error); |
660 |
660 |
|
|
|
661 |
|
/* A :command that's auto-completed. */ |
661 |
662 |
(void)vle_keys_exec_timed_out(L":plugin"); |
(void)vle_keys_exec_timed_out(L":plugin"); |
662 |
663 |
assert_false(stats->inc_completion); |
assert_false(stats->inc_completion); |
663 |
664 |
(void)vle_keys_exec_timed_out(L" "); |
(void)vle_keys_exec_timed_out(L" "); |
664 |
665 |
assert_true(stats->inc_completion); |
assert_true(stats->inc_completion); |
|
666 |
|
|
|
667 |
|
/* Verify that slash isn't treated specially as it is for user-initiated |
|
668 |
|
* completion. */ |
|
669 |
|
(void)vle_keys_exec_timed_out(L"/"); |
|
670 |
|
assert_wstring_equal(L"plugin /", stats->line); |
|
671 |
|
(void)vle_keys_exec_timed_out(L"/"); |
|
672 |
|
assert_wstring_equal(L"plugin //", stats->line); |
|
673 |
|
|
665 |
674 |
(void)vle_keys_exec_timed_out(WK_C_c); |
(void)vle_keys_exec_timed_out(WK_C_c); |
666 |
675 |
|
|
|
676 |
|
/* A :command that's not auto-completed. */ |
667 |
677 |
(void)vle_keys_exec_timed_out(L":set"); |
(void)vle_keys_exec_timed_out(L":set"); |
668 |
678 |
assert_false(stats->inc_completion); |
assert_false(stats->inc_completion); |
669 |
679 |
(void)vle_keys_exec_timed_out(L" "); |
(void)vle_keys_exec_timed_out(L" "); |