MCPcopy Create free account
hub / github.com/acl-dev/acl / test_path_correct

Function test_path_correct

lib_acl/samples/string/main.c:37–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37static void test_path_correct(void)
38{
39 const char *path[] = {
40 "/home/avwall/",
41 "/home/avwall/a.txt",
42 "/home//////avwall/",
43 "/home/avwall",
44 "/////home/avwall///",
45 "/home/avwall////",
46 "/home///avwall///",
47 "///home///avwall///",
48 "/////",
49 ".",
50 "",
51 NULL,
52 };
53 size_t i;
54 char buf[256];
55
56 for (i = 0; path[i]; i++) {
57 if (acl_dir_correct(path[i], buf, sizeof(buf)) == 0) {
58 printf("%s ==> %s\r\n", path[i], buf);
59 } else {
60 printf("failed, path: |%s|\r\n", path[i]);
61 }
62 }
63}
64
65int main(void)
66{

Callers 1

mainFunction · 0.85

Calls 1

acl_dir_correctFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…