summaryrefslogtreecommitdiff
path: root/posix/tst-rxspencer.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-21 09:20:45 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-21 09:20:45 +0000
commit53f9084e3f565d62f2a1293a72cb838b759382ce (patch)
treed12244cbe15795af699f7c656e9fcede50e3c97d /posix/tst-rxspencer.c
parentc13c99fa92bff8320d2af23717c3e4d656923932 (diff)
Update.
2003-11-21 Ulrich Drepper <drepper@redhat.com> * Makefile: Add rules to build and run tst-cond12. * tst-cond12.c: New file.
Diffstat (limited to 'posix/tst-rxspencer.c')
-rw-r--r--posix/tst-rxspencer.c44
1 files changed, 28 insertions, 16 deletions
diff --git a/posix/tst-rxspencer.c b/posix/tst-rxspencer.c
index 1b4b56f333..e9a61ea375 100644
--- a/posix/tst-rxspencer.c
+++ b/posix/tst-rxspencer.c
@@ -357,22 +357,34 @@ mb_tests (const char *pattern, int cflags, const char *string, int eflags,
for (i = 1; i < 16; ++i)
{
char *p = letters;
- if ((i & 1)
- && (strchr (pattern, 'a') || strchr (string, 'a')
- || strchr (pattern, 'A') || strchr (string, 'A')))
- *p++ = 'a', *p++ = 'A';
- if ((i & 2)
- && (strchr (pattern, 'b') || strchr (string, 'b')
- || strchr (pattern, 'B') || strchr (string, 'B')))
- *p++ = 'b', *p++ = 'B';
- if ((i & 4)
- && (strchr (pattern, 'c') || strchr (string, 'c')
- || strchr (pattern, 'C') || strchr (string, 'C')))
- *p++ = 'c', *p++ = 'C';
- if ((i & 8)
- && (strchr (pattern, 'd') || strchr (string, 'd')
- || strchr (pattern, 'D') || strchr (string, 'D')))
- *p++ = 'd', *p++ = 'D';
+ if (i & 1)
+ {
+ if (!strchr (pattern, 'a') && !strchr (string, 'a')
+ && !strchr (pattern, 'A') && !strchr (string, 'A'))
+ continue;
+ *p++ = 'a', *p++ = 'A';
+ }
+ if (i & 2)
+ {
+ if (!strchr (pattern, 'b') && !strchr (string, 'b')
+ && !strchr (pattern, 'B') && !strchr (string, 'B'))
+ continue;
+ *p++ = 'b', *p++ = 'B';
+ }
+ if (i & 4)
+ {
+ if (!strchr (pattern, 'c') && !strchr (string, 'c')
+ && !strchr (pattern, 'C') && !strchr (string, 'C'))
+ continue;
+ *p++ = 'c', *p++ = 'C';
+ }
+ if (i & 8)
+ {
+ if (!strchr (pattern, 'd') && !strchr (string, 'd')
+ && !strchr (pattern, 'D') && !strchr (string, 'D'))
+ continue;
+ *p++ = 'd', *p++ = 'D';
+ }
*p++ = '\0';
sprintf (fail, "UTF-8 %s FAIL", letters);
ret |= mb_test (pattern, cflags, string, eflags, expect, matches,