~ubuntu-branches/ubuntu/raring/avr-libc/raring-proposed

« back to all changes in this revision

Viewing changes to tests/simulate/regression/bug-19134.c

  • Committer: Bazaar Package Importer
  • Author(s): Hakan Ardo
  • Date: 2009-10-31 11:52:10 UTC
  • mfrom: (1.1.8 upstream) (4.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091031115210-x0mlijnegkce86fk
Tags: 1:1.6.7-1
* New upstream relese (closes: #544030)
* Added lintian overrides (closes: #553265)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* bug #19134: strcasecmp(): result sign is not changed by swaping args.
2
 
   $Id: bug-19134.c,v 1.1 2007/02/24 02:53:27 dmix Exp $        */
3
 
 
4
 
#include <string.h>
5
 
 
6
 
int main ()
7
 
{
8
 
    char s1[] = "a";
9
 
    char s2[] = "[";
10
 
 
11
 
    if (   (strcasecmp (s1, s2) > 0 && strcasecmp (s2, s1) > 0)
12
 
        || (strcasecmp (s1, s2) < 0 && strcasecmp (s2, s1) < 0) )
13
 
      return __LINE__;
14
 
    return 0;
15
 
}