-static int
-testGetHome ()
-{
- struct GNUNET_CONFIGURATION_Handle *cfg;
- char *fn;
- int ret;
-
- cfg = GNUNET_CONFIGURATION_create ();
- GNUNET_assert (cfg != NULL);
- GNUNET_CONFIGURATION_set_value_string (cfg, "service", "HOME",
- "/tmp/test-gnunet-disk-a/b/c");
- fn = GNUNET_DISK_get_home_filename (cfg, "service", "d", "e", NULL);
- GNUNET_assert (fn != NULL);
- GNUNET_CONFIGURATION_destroy (cfg);
- ret = strcmp ("/tmp/test-gnunet-disk-a/b/c/d/e", fn);
- GNUNET_free (fn);
- GNUNET_break (GNUNET_OK ==
- GNUNET_DISK_directory_remove ("/tmp/test-gnunet-disk-a"));
- return ret;
-}
-