2018-07-18 17:26:26 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <errno.h>
|
2018-07-20 01:17:19 +02:00
|
|
|
#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
|
|
|
|
2018-07-20 12:49:20 +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
|
|
|
}
|