Lines Matching refs:npath
25 const char *npath = NULL, *error = NULL;
26 test_assert(t_normpath_to("README.md", cwd, &npath, &error) == 0);
27 test_assert_strcmp(npath, expected);
32 const char *npath = NULL, *error = NULL;
33 test_assert(t_normpath_to("/", "/", &npath, &error) == 0);
34 test_assert_strcmp(npath, "/");
36 test_assert(t_normpath_to(cwd, cwd, &npath, &error) == 0);
37 test_assert_strcmp(npath, cwd);
51 const char *npath = cwd;
52 for (npath = cwd; l != 0; l--) {
54 test_assert_idx(t_normpath_to("../", npath, &npath, &error) == 0, l);
56 test_assert_strcmp(npath, "/");
61 const char *npath = NULL, *error = NULL;
62 test_assert(t_normpath_to(".", cwd, &npath, &error) == 0);
63 test_assert_strcmp(npath, cwd);
65 test_assert(t_normpath_to("./", cwd, &npath, &error) == 0);
66 test_assert_strcmp(npath, cwd);
68 test_assert(t_normpath_to(".////", cwd, &npath, &error) == 0);
69 test_assert_strcmp(npath, cwd);
74 const char *npath = NULL, *error = NULL;
76 test_assert(t_normpath_to("nonexistent", cwd, &npath, &error) == 0);
77 test_assert_strcmp(npath, expected);
78 test_assert(t_realpath_to("nonexistent", cwd, &npath, &error) == -1);
85 const char *npath = NULL, *error = NULL;
86 test_assert(t_normpath_to(rel_path, tmpdir, &npath, &error) == 0);
87 test_assert_strcmp(npath, tmpdir);
89 test_assert(t_normpath_to("..", tmpdir, &npath, &error) == 0);
90 test_assert_strcmp(npath, cwd);
92 test_assert(t_normpath_to("../", tmpdir, &npath, &error) == 0);
93 test_assert_strcmp(npath, cwd);
95 test_assert(t_normpath_to("../.", tmpdir, &npath, &error) == 0);
96 test_assert_strcmp(npath, cwd);
101 const char *old_dir, *npath = NULL, *error = NULL;
102 test_assert(t_realpath_to(link1, "/", &npath, &error) == 0);
103 test_assert_strcmp(npath, tmpdir);
107 "/", &npath, &error) == 0);
108 test_assert_strcmp(npath, t_strconcat(tmpdir, "/child", NULL));
116 &npath, &error) == 0);
123 const char *npath = NULL, *error = NULL;
126 "/", &npath, &error) == 0);
127 test_assert_strcmp(npath, t_strconcat(tmpdir, "/child", NULL));
132 const char *npath = NULL, *error = NULL;
134 test_assert(t_realpath_to(link2, "/", &npath, &error) == -1);