diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-02-15 04:03:24 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-02-15 04:03:24 +0000 |
commit | e1df97a08e893eced0fd80f4c24ecc4ceed6c297 (patch) | |
tree | c91623601db115356e2c2c9638b899ca8397d0fe /test | |
parent | 7434d622446653d0adabaf29c0b1b1e896d91449 (diff) | |
download | uClibc-alpine-e1df97a08e893eced0fd80f4c24ecc4ceed6c297.tar.bz2 uClibc-alpine-e1df97a08e893eced0fd80f4c24ecc4ceed6c297.tar.xz |
skip collating and equivalence stuff
Diffstat (limited to 'test')
-rw-r--r-- | test/misc/tst-fnmatch.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/test/misc/tst-fnmatch.c b/test/misc/tst-fnmatch.c index d072ef89a..74839bc6c 100644 --- a/test/misc/tst-fnmatch.c +++ b/test/misc/tst-fnmatch.c @@ -42,6 +42,14 @@ int str_isalpha(const char *str) return 0; return 1; } +int str_has_funk(const char *str, const char x) +{ + size_t i, max = strlen(str); + for (i=0; i+1<max; ++i) + if (str[i] == '[' && str[i+1] == x) + return 1; + return 0; +} int @@ -51,6 +59,7 @@ main (void) size_t linebuflen = 0; int ntests = 0; int nfailed = 0; + int nskipped = 0; char *escinput = NULL; size_t escinputlen = 0; char *escpattern = NULL; @@ -141,7 +150,22 @@ main (void) /* skip non-ascii strings */ if (!str_isalpha(pattern) || !str_isalpha(input)) { - printf("%3d: Skipping test that requires locale support\n", ++nr); + ++nskipped; + printf("%3d: fnmatch (\"%s\", \"%s\"): SKIP multibyte test (requires locale support)\n", ++nr, pattern, input); + continue; + } + /* skip collating symbols */ + if (str_has_funk(pattern, '.') || str_has_funk(input, '.')) + { + ++nskipped; + printf("%3d: fnmatch (\"%s\", \"%s\"): SKIP collating symbol test (requires locale support)\n", ++nr, pattern, input); + continue; + } + /* skip equivalence class expressions */ + if (str_has_funk(pattern, '=') || str_has_funk(input, '=')) + { + ++nskipped; + printf("%3d: fnmatch (\"%s\", \"%s\"): SKIP equivalence class test (requires locale support)\n", ++nr, pattern, input); continue; } #endif @@ -170,7 +194,7 @@ main (void) } } - printf ("=====================\n%3d tests, %3d failed\n", ntests, nfailed); + printf ("=====================\n%3d tests, %3d failed, %3d skipped\n", ntests, nfailed, nskipped); free (escpattern); free (escinput); |