4 #include <winpr/path.h>
5 #include <winpr/tchar.h>
6 #include <winpr/winpr.h>
8 int TestPathShell(
int argc,
char* argv[])
10 const int paths[] = { KNOWN_PATH_HOME, KNOWN_PATH_TEMP,
11 KNOWN_PATH_XDG_DATA_HOME, KNOWN_PATH_XDG_CONFIG_HOME,
12 KNOWN_PATH_XDG_CACHE_HOME, KNOWN_PATH_XDG_RUNTIME_DIR,
13 KNOWN_PATH_XDG_CONFIG_HOME };
14 const char* names[] = {
"KNOWN_PATH_HOME",
"KNOWN_PATH_TEMP",
15 "KNOWN_PATH_XDG_DATA_HOME",
"KNOWN_PATH_XDG_CONFIG_HOME",
16 "KNOWN_PATH_XDG_CACHE_HOME",
"KNOWN_PATH_XDG_RUNTIME_DIR",
17 "KNOWN_PATH_XDG_CONFIG_HOME" };
23 for (
size_t x = 0; x <
sizeof(paths) /
sizeof(paths[0]); x++)
25 const int id = paths[x];
26 const char* name = names[x];
28 char* path = GetKnownPath(
id);
32 (void)fprintf(stderr,
"GetKnownPath(%d) failed\n",
id);
37 printf(
"%s Path: %s\n", name, path);
42 char* path = GetKnownSubPath(
id,
"freerdp");
46 (void)fprintf(stderr,
"GetKnownSubPath(%d) failed\n",
id);
51 printf(
"%s SubPath: %s\n", name, path);