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.
<root> / tests / misc / rn_cmd_exists.c (d9072f797f0ac20cda30d7a247d52fed7b8660d5) (965B) (mode 100644) [raw]
#include <stic.h>

#include <test-utils.h>

#include "../../src/filetype.h"
#include "../../src/running.h"
#include "../../src/status.h"

TEST(system_shell_exists)
{
#ifdef _WIN32
	const char *const shell = "cmd";
#else
	const char *const shell = "sh";
#endif
	const int exists = rn_cmd_exists(shell);
	assert_true(exists);
}

TEST(start_always_exists_in_cmd_like_shells)
{
	curr_stats.shell_type = ST_CMD;
	assert_true(rn_cmd_exists("start"));

	curr_stats.shell_type = ST_YORI;
	assert_true(rn_cmd_exists("start"));
}

TEST(exe_path_with_backslashes, IF(windows))
{
	ft_init(&rn_cmd_exists);
	create_dir(SANDBOX_PATH "/dir");
	create_executable(SANDBOX_PATH "/dir/exe.exe");

	assert_true(ft_exists("\"" SANDBOX_PATH "\\dir\\exe.exe" "\""));

	remove_file(SANDBOX_PATH "/dir/exe.exe");
	remove_dir(SANDBOX_PATH "/dir");
	ft_init(NULL);
}

/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */
/* 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