Commit 449937fc authored by Sam Thursfield's avatar Sam Thursfield

Merge branch 'libtracker-common-test-paths' into 'master'

libtracker-common: improve test_path_evaluate_name environment handling

See merge request !59
parents 0477d037 b9c2b682
Pipeline #60016 passed with stage
in 2 minutes and 21 seconds
......@@ -131,14 +131,14 @@ test_path_list_filter_duplicates_with_exceptions ()
static void
test_path_evaluate_name (void)
gchar *result, *expected;
gchar *result, *expected, *pwd, *home;
const gchar *home = g_getenv ("HOME");
const gchar *pwd = g_getenv ("PWD");
const gchar *test = "/one/two";
gchar *parent_dir;
home = g_strdup (g_getenv ("HOME"));
pwd = g_get_current_dir ();
g_setenv ("TEST_TRACKER_DIR", test, TRUE);
......@@ -216,6 +216,8 @@ test_path_evaluate_name (void)
result = tracker_path_evaluate_name (tracker_test_helpers_get_nonutf8 ());
g_assert_cmpstr (result, ==, tracker_test_helpers_get_nonutf8 ());
g_free (home);
g_free (pwd);
g_unsetenv ("TEST_TRACKER_DIR");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment