httpdirfs/test.c

24 lines
471 B
C
Raw Normal View History

2018-07-18 17:26:26 +02:00
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
2018-07-18 17:26:26 +02:00
#include "link.h"
#include "test.h"
2018-07-20 16:38:44 +02:00
void link_test()
2018-07-18 17:26:26 +02:00
{
2018-07-20 16:38:44 +02:00
printf("--- start of link_test ---\n");
2018-07-18 17:26:26 +02:00
LinkTable *linktbl = LinkTable_new(
2018-07-20 16:38:44 +02:00
"http://127.0.0.1/~fangfufu/");
2018-07-20 14:59:25 +02:00
2018-07-20 03:09:51 +02:00
LinkTable_print(linktbl);
2018-07-20 16:38:44 +02:00
Link_download(linktbl->links[1], 1, 20);
printf(linktbl->links[1]->body);
2018-07-20 03:09:51 +02:00
LinkTable_free(linktbl);
2018-07-20 16:38:44 +02:00
printf("\n--- end of link_test ---\n\n");
2018-07-18 17:26:26 +02:00
}