libtld: /home/snapwebsites/snapcpp/contrib/libtld/tests/tld_test_full_uri.c File Reference

libtld  1.5.13
A library to determine the Top-Level Domain name of any URL.
tld_test_full_uri.c File Reference

Test a full URI with tld_check_uri() function. More...

#include "libtld/tld.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include "tld_data.h"
Include dependency graph for tld_test_full_uri.c:

Go to the source code of this file.


struct  test_info
 Structure used to define many tests to run against the tld_check_uri() function. More...


#define PROTOCOLS   "ftp,sftp,http,https,gopher"
#define test_info_entries_length   (sizeof(test_info_entries) / sizeof(test_info_entries[0]))


int main (int argc, char *argv[])
void test_uri ()


int err_count = 0
const struct test_info test_info_entries []
const struct tld_description tld_descriptions []
 Array of all the TLDs defined in the tld_data.c file. More...
unsigned short tld_end_offset
 The end offset of the top-most top-level domain names. More...
unsigned short tld_start_offset
 The start offset of the top-most top-level-domain names. More...
int verbose = 0

Detailed Description

This file implements various tests to verify that the tld_check_uri() function works as expected.

Definition in file tld_test_full_uri.c.

Variable Documentation

const struct tld_description tld_descriptions[]

This array is defined in the tld_data.c which is automatically generated by the tld_parser tool.

Definition at line 537 of file tld_data.c.

Referenced by search(), and tld().

unsigned short tld_end_offset

This variable holds the end of the top-most domain names in the tld_descriptions table. It is always defined. It actually represents the last offset + 1 (i.e. it is exclusive like the f_end_offset of the tld_description structure.)

Note that this value also represents the size of of the tld_descriptions table since the list of top-most domain names are saved last.

Definition at line 10272 of file tld_data.c.

Referenced by tld().

unsigned short tld_start_offset

This variable holds the start of the top-most domain names in the tld_descriptions table. It is always defined.

Definition at line 10271 of file tld_data.c.

Referenced by tld().

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly