xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit f63222b8bc2b7ae41d2a710cad42bf18e502661c

Fix running commands/completion tests on their own
bmarks indirectly use other_view while expanding macros, just initialize
the variable in SETUP. Also set {curr,other}_view to NULL in TEARDOWN.
Author: xaizek
Author date (UTC): 2026-03-29 14:25
Committer name: xaizek
Committer date (UTC): 2026-03-29 14:25
Parent(s): eb846df80ce59e4061c4a0ef7b9576a7cb2b82d2
Signing key: 99DC5E4DB05F6BE2
Tree: a9b8f3f9d6a2ef39968b7502b1add33d83c5d785
File Lines added Lines deleted
tests/commands/completion.c 4 2
File tests/commands/completion.c changed (mode: 100644) (index 9eeefd0e8..4ad348a3f)
... ... SETUP()
93 93 stats.complete = &vle_cmds_complete; stats.complete = &vle_cmds_complete;
94 94
95 95 curr_view = &lwin; curr_view = &lwin;
96 other_view = &rwin;
96 97
97 98 cmds_init(); cmds_init();
98 99
 
... ... TEARDOWN()
123 124 vle_opts_reset(); vle_opts_reset();
124 125
125 126 function_reset_all(); function_reset_all();
127
128 curr_view = NULL;
129 other_view = NULL;
126 130 } }
127 131
128 132 TEST(test_set_completion) TEST(test_set_completion)
 
... ... TEST(command_options_are_completed)
646 650 ASSERT_COMPLETION(L"copy -", L"copy -deep"); ASSERT_COMPLETION(L"copy -", L"copy -deep");
647 651 ASSERT_NEXT_MATCH("-skip"); ASSERT_NEXT_MATCH("-skip");
648 652
649 other_view = &rwin;
650 653 #ifndef _WIN32 #ifndef _WIN32
651 654 ASSERT_COMPLETION(L"copy -- -", L"copy -- ./-"); ASSERT_COMPLETION(L"copy -- -", L"copy -- ./-");
652 655 #else #else
653 656 ASSERT_COMPLETION(L"copy -- -", L"copy -- -"); ASSERT_COMPLETION(L"copy -- -", L"copy -- -");
654 657 #endif #endif
655 other_view = NULL;
656 658 } }
657 659
658 660 TEST(wingo_is_completed) TEST(wingo_is_completed)
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master