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 fef4f82bd5c2e905d1fd443d9225e5089ac20a16

Test int/term_title.c:get_title_kind()
Author: xaizek
Author date (UTC): 2019-07-25 16:48
Committer name: xaizek
Committer date (UTC): 2019-07-25 16:56
Parent(s): 841e4a49d10b4bdca13cfa507d66c7a322ddc630
Signing key: 99DC5E4DB05F6BE2
Tree: 275786b2c65e6ae8d6a881053429d5dbf88f6796
File Lines added Lines deleted
tests/misc/integration.c 41 0
File tests/misc/integration.c changed (mode: 100644) (index 5716e9581..4a88c4313)
9 9 #include "../../src/cfg/config.h" #include "../../src/cfg/config.h"
10 10 #include "../../src/compat/fs_limits.h" #include "../../src/compat/fs_limits.h"
11 11 #include "../../src/engine/keys.h" #include "../../src/engine/keys.h"
12 #include "../../src/int/term_title.h"
12 13 #include "../../src/int/vim.h" #include "../../src/int/vim.h"
13 14 #include "../../src/modes/modes.h" #include "../../src/modes/modes.h"
14 15 #include "../../src/modes/wk.h" #include "../../src/modes/wk.h"
15 16 #include "../../src/ui/column_view.h" #include "../../src/ui/column_view.h"
16 17 #include "../../src/ui/fileview.h" #include "../../src/ui/fileview.h"
17 18 #include "../../src/utils/fs.h" #include "../../src/utils/fs.h"
19 #include "../../src/utils/macros.h"
18 20 #include "../../src/utils/str.h" #include "../../src/utils/str.h"
19 21 #include "../../src/event_loop.h" #include "../../src/event_loop.h"
20 22 #include "../../src/filelist.h" #include "../../src/filelist.h"
 
... ... SETUP()
32 34 TEARDOWN() TEARDOWN()
33 35 { {
34 36 update_string(&cfg.shell, NULL); update_string(&cfg.shell, NULL);
37 update_string(&cfg.slow_fs_list, NULL);
35 38 } }
36 39
37 40 /* Because of fmemopen(). */ /* Because of fmemopen(). */
 
... ... TEST(externally_edited_local_filter_is_applied, IF(not_windows))
253 256 restore_cwd(saved_cwd); restore_cwd(saved_cwd);
254 257 } }
255 258
259 TEST(title_support_is_detected_correctly)
260 {
261 static char *XTERM_LIKE[] = {
262 "xterm", "xterm-256color", "rxvt", "rxvt-256color", "rxvt-unicode",
263 "aterm", "Eterm",
264 };
265
266 static char *SCREEN_LIKE[] = {
267 "screen", "screen-bce", "screen-256color", "screen-256color-bce"
268 };
269
270 #ifdef _WIN32
271 unsigned int i;
272 for(i = 0; i < ARRAY_LEN(XTERM_LIKE); ++i)
273 {
274 assert_int_equal(TK_REGULAR, get_title_kind(XTERM_LIKE[i]));
275 }
276 for(i = 0; i < ARRAY_LEN(SCREEN_LIKE); ++i)
277 {
278 assert_int_equal(TK_REGULAR, get_title_kind(SCREEN_LIKE[i]));
279 }
280 assert_int_equal(TK_REGULAR, get_title_kind("linux"));
281 assert_int_equal(TK_REGULAR, get_title_kind("unknown"));
282 #else
283 unsigned int i;
284 for(i = 0; i < ARRAY_LEN(XTERM_LIKE); ++i)
285 {
286 assert_int_equal(TK_REGULAR, get_title_kind(XTERM_LIKE[i]));
287 }
288 for(i = 0; i < ARRAY_LEN(SCREEN_LIKE); ++i)
289 {
290 assert_int_equal(TK_SCREEN, get_title_kind(SCREEN_LIKE[i]));
291 }
292 assert_int_equal(TK_ABSENT, get_title_kind("linux"));
293 assert_int_equal(TK_ABSENT, get_title_kind("unknown"));
294 #endif
295 }
296
256 297 /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */
257 298 /* 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