File: testxdg.c

package info (click to toggle)
fcitx 1%3A4.2.9.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,800 kB
  • sloc: ansic: 134,151; cpp: 7,280; sh: 2,778; python: 800; xml: 345; makefile: 42
file content (22 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <assert.h>
#include <string.h>
#include "fcitx-config/xdg.h"

int main()
{
    char* ret = NULL;
    FcitxXDGGetFileUserWithPrefix("test", "/test", NULL, &ret);
    assert(ret);
    assert(strcmp(ret, "/test") == 0);
    free(ret);
    FcitxXDGGetFileWithPrefix("test", "/test", NULL, &ret);
    assert(ret);
    assert(strcmp(ret, "/test") == 0);
    free(ret);
    FcitxXDGGetLibFile("/test", NULL, &ret);
    assert(ret);
    assert(strcmp(ret, "/test") == 0);
    free(ret);

    return 0;
}