Back to index

courier  0.68.2
Classes | Functions
enttest.c File Reference
#include "unicode_config.h"
#include "unicode.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "unicode_htmlent.h"

Go to the source code of this file.

Classes

struct  i

Functions

static void testsuite ()
int main (int argc, char **argv)

Class Documentation

struct i

Definition at line 8 of file enttest.c.

Class Members
size_t n_size
size_t n_start
unicode_char v

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 51 of file enttest.c.

{
       testsuite();
       return 0;
}

Here is the call graph for this function:

static void testsuite ( ) [static]

Definition at line 16 of file enttest.c.

{
       size_t j;

       for (j=0; j<sizeof(ii)/sizeof(ii[0]); ++j)
       {
              char buf[60];

              memcpy(buf, n + ii[j].n_start, ii[j].n_size);
              buf[ii[j].n_size]=0;

              if (unicode_html40ent_lookup(buf) != ii[j].v)
              {
                     fprintf(stderr, "Did not find %s\n", buf);
                     exit(1);
              }

              strcat(buf, "X");

              if (unicode_html40ent_lookup(buf) == ii[j].v)
              {
                     fprintf(stderr, "Found %s?\n", buf);
                     exit(1);
              }

              buf[strlen(buf)-2]=0;

              if (unicode_html40ent_lookup(buf) == ii[j].v)
              {
                     fprintf(stderr, "Found %s?\n", buf);
                     exit(1);
              }
       }
}

Here is the call graph for this function:

Here is the caller graph for this function: