mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Update.
2003-06-12 H.J. Lu <hongjiu.lu@intel.com> * posix/transbug.c (run_test): Return 1 for failure. (do_test): Compare only if run_test is successful. 2003-06-12 Simon Josefsson <jas@extundo.com> * argp/argp.h [!__THROW]: Define if undefined. * posix/transbug.c: New file. * inet/Makefile (aux): Add check_pf. * include/ifaddrs.h: Add prototype for __check_pf. * sysdeps/generic/check_pf.c: New file. * sysdeps/unix/sysv/linux/check_pf.c: New file.
This commit is contained in:
@@ -105,7 +105,7 @@ run_test (const char *pattern, struct re_registers *regs)
|
||||
printf ("search 2: res = %d, start = %d, end = %d\n",
|
||||
res, regs[1].start[0], regs[1].end[0]);
|
||||
|
||||
return 0;
|
||||
return res < 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,17 +120,19 @@ do_test (void)
|
||||
|
||||
(void) re_set_syntax (RE_SYNTAX_GNU_AWK);
|
||||
|
||||
run_test (lower, regs);
|
||||
run_test (upper, ®s[2]);
|
||||
|
||||
int result = 0;
|
||||
int result;
|
||||
#define CHECK(exp) \
|
||||
if (exp) { puts (#exp); result = 1; }
|
||||
|
||||
CHECK (regs[0].start[0] != regs[2].start[0]);
|
||||
CHECK (regs[0].end[0] != regs[2].end[0]);
|
||||
CHECK (regs[1].start[0] != regs[3].start[0]);
|
||||
CHECK (regs[1].end[0] != regs[3].end[0]);
|
||||
result = run_test (lower, regs);
|
||||
result |= run_test (upper, ®s[2]);
|
||||
if (! result)
|
||||
{
|
||||
CHECK (regs[0].start[0] != regs[2].start[0]);
|
||||
CHECK (regs[0].end[0] != regs[2].end[0]);
|
||||
CHECK (regs[1].start[0] != regs[3].start[0]);
|
||||
CHECK (regs[1].end[0] != regs[3].end[0]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user