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 a620953be6fc1ab651d16641039e3bf9796f7bd1

More test coverage for running.c unit
Author: xaizek
Author date (UTC): 2020-02-06 23:26
Committer name: xaizek
Committer date (UTC): 2020-02-06 23:26
Parent(s): 33f393f3130b684d27814b0cb6af8c529e22cdbb
Signing key: 99DC5E4DB05F6BE2
Tree: 0858390a7cab07e4d3c7af42b0694f5a3362329e
File Lines added Lines deleted
tests/misc/running.c 48 0
File tests/misc/running.c changed (mode: 100644) (index 8c7a3cd58..4c93c4fd9)
... ... TEST(entering_a_directory, IF(not_windows))
365 365 stop_use_script(); stop_use_script();
366 366 } }
367 367
368 TEST(macro_can_be_added_implicitly, IF(not_windows))
369 {
370 start_use_script();
371 lwin.dir_entry[1].selected = 0;
372
373 char *error;
374 matchers_t *ms = matchers_alloc("{a}", 0, 1, "", &error);
375 assert_non_null(ms);
376
377 char cmd[PATH_MAX + 1];
378 snprintf(cmd, sizeof(cmd), "%s a", script_path);
379 ft_set_programs(ms, cmd, 0, 0);
380
381 rn_open(&lwin, FHE_NO_RUN);
382
383 const char *lines[] = { "a" };
384 file_is(SANDBOX_PATH "/a-list", lines, ARRAY_LEN(lines));
385
386 assert_success(remove(SANDBOX_PATH "/a-list"));
387 assert_failure(remove(SANDBOX_PATH "/vi-list"));
388
389 stop_use_script();
390 }
391
392 TEST(handler_can_be_matched_by_a_prefix, IF(not_windows))
393 {
394 start_use_script();
395 lwin.dir_entry[1].selected = 0;
396
397 char *error;
398 matchers_t *ms = matchers_alloc("{a}", 0, 1, "", &error);
399 assert_non_null(ms);
400
401 char cmd[PATH_MAX + 1];
402 snprintf(cmd, sizeof(cmd), "{wrong}no-such-cmd a, {right}%s a", script_path);
403 ft_set_programs(ms, cmd, 0, 0);
404
405 rn_open_with_match(&lwin, script_path, 0);
406
407 const char *lines[] = { "a" };
408 file_is(SANDBOX_PATH "/a-list", lines, ARRAY_LEN(lines));
409
410 assert_success(remove(SANDBOX_PATH "/a-list"));
411 assert_failure(remove(SANDBOX_PATH "/vi-list"));
412
413 stop_use_script();
414 }
415
368 416 static int static int
369 417 prog_exists(const char name[]) prog_exists(const char name[])
370 418 { {
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