Ignore:
Timestamp:
Jun 27, 2005, 5:05:29 AM (20 years ago)
Author:
bird
Message:

testcase adjustments.

Location:
trunk/src/libctests/glibc/stdlib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libctests/glibc/stdlib/bug-strtod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2088 r2089  
    2222#include <stdlib.h>
    2323#include <string.h>
     24#ifdef __EMX__ /* one of the above seems to be declaring ssize_t... glibc feat I guess. */
     25#include <sys/types.h>
     26#endif
    2427
    2528
  • trunk/src/libctests/glibc/stdlib/test-canon.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2088 r2089  
    112112            && strcmp (result + cwd_len, expected + 1) == 0);
    113113  else
    114     good = (strcmp (expected, result) == 0);
     114    {
     115      good = (strcmp (expected, result) == 0);
     116#ifdef __EMX__
     117      if (!good && expected[0] == '/' && result[1] == ':' && result[2] == '/')
     118        good = (strcmp (expected, result + 2) == 0);
     119#endif
     120    }
    115121
    116122  return good;
     
    158164    symlink (symlinks[i].value, symlinks[i].name);
    159165
     166  int rmdir_etc = mkdir ("/etc", 0777) == 0;
     167
    160168  int has_dir = mkdir ("doesExist", 0777) == 0;
    161169
     
    213221    }
    214222
     223#ifdef __EMX__
     224  if (fd >= 0) /* cannot unlink open files */
     225    close (fd);
     226#endif
    215227  if (fd >= 0)
    216228    unlink ("doesExist/someFile");
     
    218230  if (has_dir)
    219231    rmdir ("doesExist");
     232
     233  if (rmdir_etc)
     234    rmdir ("/etc");
    220235
    221236  for (i = 0; i < (int) (sizeof (symlinks) / sizeof (symlinks[0])); ++i)
  • trunk/src/libctests/glibc/stdlib/testsort.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2088 r2089  
    1010
    1111int
    12 main (void)
     12main (int argc, char **argv)
    1313{
    1414  char bufs[500][20];
     
    1616  size_t lens[500];
    1717  size_t i, j;
     18  int errors;
    1819
    1920  srandom (1);
     
    3031  qsort (lines, 500, sizeof (char *), compare);
    3132
    32   for (i = 0; i < 500 && lines[i] != NULL; ++i)
    33     puts (lines[i]);
     33  for (i = 0, errors = 0; i < 499; ++i)
     34    if (!lines[i] || !lines[i + 1] || strcmp(lines[i], lines[i + 1]) > 0)
     35      errors++;
    3436
    35   return 0;
     37  if (errors)
     38    {
     39      printf("%s: %d errors!\n", argv[0], errors);
     40      for (i = 0; i < 500 && lines[i] != NULL; ++i)
     41        puts (lines[i]);
     42    }
     43
     44  return !!errors;
    3645}
  • trunk/src/libctests/glibc/stdlib/tst-strtod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2088 r2089  
    222222locale_test (void)
    223223{
     224#ifdef HAVE___STRTOD_INTERNAL
    224225  static const struct
    225226  {
     
    272273  if (result == 0)
    273274    puts ("all OK");
    274 
    275275  return result;
    276 }
     276#else /* NO __strtod_internal */
     277  return 0;
     278#endif
     279}
Note: See TracChangeset for help on using the changeset viewer.