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 a66365bba4e1790fb777c0fcfdd9a293e0716136

Test :delete in foreground and background
It's a basic form which deletes file under the cursor, more advanced
functionality is already tested by other unit tests.
Author: xaizek
Author date (UTC): 2026-03-21 13:45
Committer name: xaizek
Committer date (UTC): 2026-03-21 13:54
Parent(s): d24929dbef210309d1d073dc6dae2fe2b29f1252
Signing key: 99DC5E4DB05F6BE2
Tree: 061ed3713acae78dc0049da04b803c464d4bda66
File Lines added Lines deleted
tests/commands/misc_fops.c 26 0
File tests/commands/misc_fops.c changed (mode: 100644) (index b414e5b82..20c91a6f5)
... ... TEST(non_zero_count_is_handled)
359 359 regs_reset(); regs_reset();
360 360 } }
361 361
362 TEST(delete, REPEAT(2))
363 {
364 const int in_bg = (STIC_TEST_PARAM == 1);
365
366 create_file(SANDBOX_PATH "/file");
367
368 make_abs_path(lwin.curr_dir, sizeof(lwin.curr_dir), SANDBOX_PATH, "", cwd);
369 populate_dir_list(&lwin, /*reload=*/0);
370 assert_string_equal("file", lwin.dir_entry[lwin.list_pos].name);
371
372 ui_sb_msg("");
373 if(in_bg)
374 {
375 assert_success(cmds_dispatch1("delete &", &lwin, CIT_COMMAND));
376 wait_for_bg();
377 assert_string_equal("", ui_sb_last());
378 }
379 else
380 {
381 assert_failure(cmds_dispatch1("delete", &lwin, CIT_COMMAND));
382 assert_string_equal("1 item Deleted", ui_sb_last());
383 }
384
385 no_remove_file(SANDBOX_PATH "/file");
386 }
387
362 388 static OpsResult static OpsResult
363 389 exec_func(OPS op, void *data, const char *src, const char *dst) exec_func(OPS op, void *data, const char *src, const char *dst)
364 390 { {
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