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 128e97fbe33903e3b1f21d056867455622137420

Test al and rl keys in normal mode
Author: xaizek
Author date (UTC): 2026-03-07 17:20
Committer name: xaizek
Committer date (UTC): 2026-03-11 22:20
Parent(s): 16f95f58114106f62c28f8a75002616eebdda314
Signing key: 99DC5E4DB05F6BE2
Tree: 55e2a3b768b537fa0070baf1734cc38e958a8ba9
File Lines added Lines deleted
tests/misc/normal.c 40 0
File tests/misc/normal.c changed (mode: 100644) (index 3d71e8ab5..7d769c939)
16 16 #include "../../src/ui/statusbar.h" #include "../../src/ui/statusbar.h"
17 17 #include "../../src/ui/ui.h" #include "../../src/ui/ui.h"
18 18 #include "../../src/utils/fs.h" #include "../../src/utils/fs.h"
19 #include "../../src/utils/path.h"
19 20 #include "../../src/utils/str.h" #include "../../src/utils/str.h"
20 21 #include "../../src/filelist.h" #include "../../src/filelist.h"
21 22 #include "../../src/flist_sel.h" #include "../../src/flist_sel.h"
 
... ... TEST(cl_multiple_files, IF(not_windows))
447 448 undo_teardown(); undo_teardown();
448 449 } }
449 450
451 TEST(al_rl, IF(not_windows), REPEAT(2))
452 {
453 const int al = (STIC_TEST_PARAM == 0);
454
455 regs_init();
456
457 make_abs_path(lwin.curr_dir, sizeof(lwin.curr_dir), TEST_DATA_PATH, "read",
458 cwd);
459 populate_dir_list(&lwin, /*reload=*/0);
460 (void)vle_keys_exec_timed_out(L"yy");
461
462 make_abs_path(lwin.curr_dir, sizeof(lwin.curr_dir), SANDBOX_PATH, "", cwd);
463 populate_dir_list(&lwin, /*reload=*/0);
464
465 ui_sb_msg("");
466 (void)vle_keys_exec_timed_out(al ? L"al" : L"rl");
467 assert_success(chdir(cwd));
468
469 char target[PATH_MAX + 1];
470 assert_success(get_link_target(SANDBOX_PATH "/binary-data", target,
471 sizeof(target)));
472
473 assert_string_ends_with("/binary-data", target);
474 if(al)
475 {
476 assert_string_equal("1 item linked (abs)", ui_sb_last());
477 assert_true(is_path_absolute(target));
478 }
479 else
480 {
481 assert_string_equal("1 item linked (rel)", ui_sb_last());
482 assert_false(is_path_absolute(target));
483 }
484
485 remove_file(SANDBOX_PATH "/binary-data");
486
487 regs_reset();
488 }
489
450 490 /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */
451 491 /* vim: set cinoptions+=t0 filetype=c : */ /* vim: set cinoptions+=t0 filetype=c : */
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