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 756b7dd452b7ed3f336b5dc3003359729dd57cd0

Fix NULL in vararg list in tests
Author: xaizek
Author date (UTC): 2016-02-09 21:30
Committer name: xaizek
Committer date (UTC): 2016-02-10 13:13
Parent(s): bb7df70461600d9b0f204547c38d62891ab8741f
Signing key:
Tree: 3fb52ca42ac4271ec1127722dfdc7460b1508fb4
File Lines added Lines deleted
src/utils/path.c 1 1
tests/env/get_one_of_def.c 4 4
File src/utils/path.c changed (mode: 100644) (index 6a99d3722..3f680628a)
... ... const char *
746 746 get_tmpdir(void) get_tmpdir(void)
747 747 { {
748 748 return env_get_one_of_def("/tmp/", "TMPDIR", "TEMP", "TEMPDIR", "TMP", return env_get_one_of_def("/tmp/", "TMPDIR", "TEMP", "TEMPDIR", "TMP",
749 (char *)NULL);
749 (const char *)NULL);
750 750 } }
751 751
752 752 #ifdef _WIN32 #ifdef _WIN32
File tests/env/get_one_of_def.c changed (mode: 100644) (index 521464dcd..7b6920b91)
... ... SETUP()
20 20 TEST(empty_list_returns_def) TEST(empty_list_returns_def)
21 21 { {
22 22 const char *result; const char *result;
23 result = env_get_one_of_def(DEFAULT_VAL, NULL);
23 result = env_get_one_of_def(DEFAULT_VAL, (const char *)NULL);
24 24 assert_string_equal(DEFAULT_VAL, result); assert_string_equal(DEFAULT_VAL, result);
25 25 } }
26 26
27 27 TEST(none_exist_returns_def) TEST(none_exist_returns_def)
28 28 { {
29 29 const char *result; const char *result;
30 result = env_get_one_of_def(DEFAULT_VAL, VAR_A, VAR_B, NULL);
30 result = env_get_one_of_def(DEFAULT_VAL, VAR_A, VAR_B, (const char *)NULL);
31 31 assert_string_equal(DEFAULT_VAL, result); assert_string_equal(DEFAULT_VAL, result);
32 32 } }
33 33
 
... ... TEST(last_exists_returns_it)
35 35 { {
36 36 const char *result; const char *result;
37 37 env_set(VAR_B, VAR_B_VAL); env_set(VAR_B, VAR_B_VAL);
38 result = env_get_one_of_def(DEFAULT_VAL, VAR_A, VAR_B, NULL);
38 result = env_get_one_of_def(DEFAULT_VAL, VAR_A, VAR_B, (const char *)NULL);
39 39 assert_string_equal(VAR_B_VAL, result); assert_string_equal(VAR_B_VAL, result);
40 40 } }
41 41
 
... ... TEST(all_exist_returns_first)
44 44 const char *result; const char *result;
45 45 env_set(VAR_A, VAR_A_VAL); env_set(VAR_A, VAR_A_VAL);
46 46 env_set(VAR_B, VAR_B_VAL); env_set(VAR_B, VAR_B_VAL);
47 result = env_get_one_of_def(DEFAULT_VAL, VAR_A, VAR_B, NULL);
47 result = env_get_one_of_def(DEFAULT_VAL, VAR_A, VAR_B, (const char *)NULL);
48 48 assert_string_equal(VAR_A_VAL, result); assert_string_equal(VAR_A_VAL, result);
49 49 } }
50 50
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