diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-12-10 10:00:31 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-12-10 10:00:31 +0000 |
commit | 648c133790556357a430d83c2c89a2bd01df9e27 (patch) | |
tree | bc39460863b155333aeb1a8bafc884e48e3ed1d5 /posix | |
parent | b77e6cd62103be90cd9cdd8e24372cb5324916ad (diff) | |
download | glibc-648c133790556357a430d83c2c89a2bd01df9e27.zip glibc-648c133790556357a430d83c2c89a2bd01df9e27.tar.gz glibc-648c133790556357a430d83c2c89a2bd01df9e27.tar.bz2 |
Update.
1998-12-09 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/unix/sysv/linux/sys/procfs.h: Use sys/user.h not
asm/user.h.
* sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h: New file,
like linux/sys/procfs.h but uses uid_t and gid_t.
* sysdeps/unix/sysv/linux/powerpc/sys/user.h: New file,
don't include <linux/ptrace.h>.
1998-12-08 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* posix/runptests.c (main): Check that regcomp did not succeed
unexpectedly.
* posix/runtests.c (run_a_test): Likewise. Return appropriate
exit code.
* posix/TESTS: Regexp "a[b-a]" should not compile.
* posix/PTESTS: Comment out bogus tests GA113(2), GA145(2) and
GA147(2).
1998-12-09 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* locale/programs/ld-ctype.c (allocate_arrays): Don't crash if
there is no codeset name.
* locale/programs/ld-collate.c (collate_output): Don't crash if a
character has no weight.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/PTESTS | 30 | ||||
-rw-r--r-- | posix/TESTS | 2 | ||||
-rw-r--r-- | posix/runptests.c | 10 | ||||
-rw-r--r-- | posix/runtests.c | 13 |
4 files changed, 33 insertions, 22 deletions
diff --git a/posix/PTESTS b/posix/PTESTS index 198456f..cc626fa 100644 --- a/posix/PTESTS +++ b/posix/PTESTS @@ -42,11 +42,11 @@ -1¦-1¦\(^*ab\)¦^*ab¦ -1¦-1¦\(^*b\)¦a*b¦ -1¦-1¦\(^*b\)¦^*b¦ -# GA113(2) --1¦-1¦\(^*ab\)¦*ab¦ --1¦-1¦\(^*ab\)¦^*ab¦ -1¦1¦\(^*b\)¦b¦ -1¦3¦\(^*b\)¦^^b¦ +### GA113(2) GNU regex implements GA113(1) +##-1¦-1¦\(^*ab\)¦*ab¦ +##-1¦-1¦\(^*ab\)¦^*ab¦ +##1¦1¦\(^*b\)¦b¦ +##1¦3¦\(^*b\)¦^^b¦ # GA114 1¦3¦a^b¦a^b¦ 1¦3¦a\^b¦a^b¦ @@ -275,11 +275,11 @@ 1¦1¦\(^^\)¦^^¦ 1¦3¦\(^abc\)¦abcdef¦ -1¦-1¦\(^def\)¦abcdef¦ -# GA145(2) --1¦-1¦\(^a\)\1¦aabc¦ -1¦4¦\(^a\)\1¦^a^abc¦ --1¦-1¦\(^^a\)¦^a¦ -1¦2¦\(^^\)¦^^¦ +### GA145(2) GNU regex implements GA145(1) +##-1¦-1¦\(^a\)\1¦aabc¦ +##1¦4¦\(^a\)\1¦^a^abc¦ +##-1¦-1¦\(^^a\)¦^a¦ +##1¦2¦\(^^\)¦^^¦ # GA146 3¦3¦a$¦cba¦ -1¦-1¦a$¦abc¦ @@ -295,11 +295,11 @@ 1¦2¦\(ab$\)¦ab¦ 4¦6¦\(def$\)¦abcdef¦ -1¦-1¦\(abc$\)¦abcdef¦ -# GA147(2) --1¦-1¦\(a$\)\1¦bcaa¦ -2¦5¦\(a$\)\1¦ba$a$¦ --1¦-1¦\(ab$\)¦ab¦ -1¦3¦\(ab$\)¦ab$¦ +### GA147(2) GNU regex implements GA147(1) +##-1¦-1¦\(a$\)\1¦bcaa¦ +##2¦5¦\(a$\)\1¦ba$a$¦ +##-1¦-1¦\(ab$\)¦ab¦ +##1¦3¦\(ab$\)¦ab$¦ # GA148 0¦0¦^$¦¦ 1¦3¦^abc$¦abc¦ diff --git a/posix/TESTS b/posix/TESTS index 4f1c49f..858e223 100644 --- a/posix/TESTS +++ b/posix/TESTS @@ -39,7 +39,7 @@ 0:a[b-d]:aac 0:a[-b]:a- 0:a[b-]:a- -1:a[b-a]:- +2:a[b-a]:- 2:a[]b:- 2:a[:- 0:a]:a] diff --git a/posix/runptests.c b/posix/runptests.c index b1eabb9..fcea5b3 100644 --- a/posix/runptests.c +++ b/posix/runptests.c @@ -63,8 +63,8 @@ main (int argc, char *argv[]) err = regcomp (&re, tests[cnt].reg, tests[cnt].options); if (err != 0) { - if (tests[cnt].start == -1) - puts ("failed, OK"); + if (tests[cnt].start == -2) + puts ("compiling failed, OK"); else { char buf[100]; @@ -75,6 +75,12 @@ main (int argc, char *argv[]) continue; } + else if (tests[cnt].start == -2) + { + puts ("compiling suceeds, FAIL"); + errors++; + continue; + } /* Run the actual test. */ err = regexec (&re, tests[cnt].str, 20, match, 0); diff --git a/posix/runtests.c b/posix/runtests.c index b6a292e..8347286 100644 --- a/posix/runtests.c +++ b/posix/runtests.c @@ -65,7 +65,7 @@ run_a_test (int id, const struct a_test * t) err = regcomp (&r, t->pattern, REG_EXTENDED); if (err) { - if (t->expected) + if (t->expected == 2) { puts (" OK."); return 0; @@ -75,6 +75,13 @@ run_a_test (int id, const struct a_test * t) puts (errmsg); return 1; } + else if (t->expected == 2) + { + printf ("test %d\n", id); + printf ("pattern \"%s\" successfull compilation not expected\n", + t->pattern); + return 1; + } } err = regexec (&r, t->data, 10, regs, 0); @@ -124,9 +131,7 @@ main (int argc, char * argv[]) printf ("#%d:", x); res |= run_a_test (x, &the_tests[x]); } - { - exit (0); - } + exit (res != 0); } |