libtld 1.2.0
|
#include "tld.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include "tld_data.h"
Go to the source code of this file.
Functions | |
void | cat_ext (int offset, char *uri) |
Build an extension from any offset. | |
int | main (int argc, char *argv[]) |
void | test_all () |
void | test_invalid () |
void | test_unknown () |
Variables | |
int | err_count = 0 |
struct tld_description | tld_descriptions [] |
unsigned short | tld_end_offset |
unsigned short | tld_start_offset |
void cat_ext | ( | int | offset, |
char * | uri | ||
) |
Create a domain name extensions from any entry in the TLD descriptions.
[in] | offset | The offset in the tld_descriptions table |
[in] | uri | The URI buffer |
Definition at line 53 of file tld_test.c.
References tld_description::f_end_offset, tld_description::f_start_offset, tld_description::f_tld, tld_descriptions, and tld_end_offset.
Referenced by test_all().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 333 of file tld_test.c.
References err_count, test_all(), test_invalid(), test_unknown(), and tld_version().
void test_all | ( | ) |
Definition at line 85 of file tld_test.c.
References cat_ext(), err_count, tld_description::f_exception_apply_to, tld_info::f_offset, tld_info::f_status, tld_info::f_tld, tld(), tld_descriptions, tld_end_offset, TLD_RESULT_INVALID, TLD_RESULT_SUCCESS, TLD_STATUS_EXCEPTION, and TLD_STATUS_VALID.
Referenced by main().
void test_invalid | ( | ) |
Definition at line 237 of file tld_test.c.
References err_count, tld_info::f_category, tld_info::f_country, tld_info::f_offset, tld_info::f_status, tld_info::f_tld, tld(), TLD_CATEGORY_UNDEFINED, TLD_RESULT_BAD_URI, TLD_RESULT_NO_TLD, TLD_RESULT_NULL, and TLD_STATUS_UNDEFINED.
Referenced by main().
void test_unknown | ( | ) |
Definition at line 206 of file tld_test.c.
References err_count, tld(), and TLD_RESULT_NOT_FOUND.
Referenced by main().
int err_count = 0 |
Definition at line 34 of file tld_test.c.
struct tld_description tld_descriptions[] |
unsigned short tld_end_offset |
unsigned short tld_start_offset |
This document is part of the libtld Project.
Copyright by Made to Order Software Corp.