From e80e1f11744ee5f3c58f747bb9599def5db02531 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Tue, 12 Jun 2012 14:26:43 +0300 Subject: [PATCH] Ticket #2803: fixed bug do_panel_cd: FTBFS with --enable-tests on [kfreebsd-i386,kfreebsd-amd64,ia64,armhf] One of the panel tests fail if build environment doesn't contain the home user directory. Signed-off-by: Slava Zanko --- tests/src/filemanager/do_panel_cd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/src/filemanager/do_panel_cd.c b/tests/src/filemanager/do_panel_cd.c index 30368be96..692c1f62a 100644 --- a/tests/src/filemanager/do_panel_cd.c +++ b/tests/src/filemanager/do_panel_cd.c @@ -60,6 +60,7 @@ START_TEST (test_do_panel_cd_empty_mean_home) { char *cwd; char *home_wd; + const char *home_directory; struct WPanel *panel; gboolean ret; vfs_path_t *empty_path; @@ -71,7 +72,11 @@ START_TEST (test_do_panel_cd_empty_mean_home) panel->lwd_vpath = vfs_path_from_str("/"); panel->sort_info.sort_field = g_new0(panel_field_t,1); - empty_path = vfs_path_from_str (mc_config_get_home_dir()); + home_directory = mc_config_get_home_dir(); + if (home_directory == NULL) + home_directory = "/home/test"; + + empty_path = vfs_path_from_str (home_directory); /* * normalize path to handle HOME with trailing slashes: -- 2.11.4.GIT