summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-04-29 22:54:42 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-04-29 22:54:42 (EDT)
commit50f9ee989f89fd47a5f554d9967e8abedd6bd938 (patch)
tree1bcced1d78ca216bbf6f1b75fb022f4da304ad88 /src
parent42156fbb5d41e2360336c32365e89b14fe5b01ca (diff)
dirent: Remove test code
Diffstat (limited to 'src')
-rw-r--r--src/dirent.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/dirent.c b/src/dirent.c
index 52e8f84..7783120 100644
--- a/src/dirent.c
+++ b/src/dirent.c
@@ -116,37 +116,3 @@ opkg_opk_dirent_full_name(struct opkg_opk_dirent *dirent)
*cur = '\0';
return name;
}
-
-int
-main()
-{
- struct opkg_opk_dirent foo = {
- .name = "foo",
- .parent = NULL,
- };
- struct opkg_opk_dirent bar = {
- .name = "bar",
- .parent = &foo,
- };
- char *full_name;
- char name[5];
- char pref[5];
-
- full_name = opkg_opk_dirent_full_name(&bar);
- if (full_name == NULL) {
- puts("Error building full name");
- return EXIT_FAILURE;
- }
- puts(full_name);
- free(full_name);
-
- if (opkg_opk_dirent_name_prefix(&bar, name, 5, pref, 5) != OPKG_OPK_OK)
- {
- puts("Error building name parts");
- return EXIT_FAILURE;
- }
- puts(name);
- puts(pref);
-
- return EXIT_SUCCESS;
-}