~vorlon/ubuntu/natty/libidn/multiarch

« back to all changes in this revision

Viewing changes to lib/gltests/test-c-strncasecmp.c

  • Committer: Bazaar Package Importer
  • Author(s): Simon Josefsson, Simon Josefsson
  • Date: 2010-02-15 13:36:58 UTC
  • mfrom: (1.2.13 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100215133658-wbevca0cl958vasv
Tags: 1.18-1
[ Simon Josefsson ]
* New upstream version.
* libidn11.symbols: Fix based on upstream changes.
* Moved from experimental to unstable after testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Test of case-insensitive string comparison function.
2
 
   Copyright (C) 2007-2008 Free Software Foundation, Inc.
 
2
   Copyright (C) 2007-2010 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
21
21
#include "c-strcase.h"
22
22
 
23
23
#include <locale.h>
24
 
#include <stdio.h>
25
 
#include <stdlib.h>
26
24
#include <string.h>
27
25
 
28
 
#define ASSERT(expr) \
29
 
  do                                                                         \
30
 
    {                                                                        \
31
 
      if (!(expr))                                                           \
32
 
        {                                                                    \
33
 
          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
34
 
          fflush (stderr);                                                   \
35
 
          abort ();                                                          \
36
 
        }                                                                    \
37
 
    }                                                                        \
38
 
  while (0)
 
26
#include "macros.h"
39
27
 
40
28
int
41
29
main (int argc, char *argv[])
44
32
    {
45
33
      /* configure should already have checked that the locale is supported.  */
46
34
      if (setlocale (LC_ALL, "") == NULL)
47
 
        return 1;
 
35
        return 1;
48
36
    }
49
37
 
50
38
  ASSERT (c_strncasecmp ("paragraph", "Paragraph", 1000000) == 0);