public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] More bug-regex19 tests
@ 2003-11-21 18:54 Jakub Jelinek
  2003-11-21 23:25 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2003-11-21 18:54 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

Hi!

I thought using COMPLEX_BRACKET (which is handled specially in
transit_state_mb) would cure things, but it fixed only the most simple
tests.  This patch just adds the modified tests so that they are tested
when this issue is fixed as well.

2003-11-21  Jakub Jelinek  <jakub@redhat.com>

	* posix/bug-regex19.c (tests): Add more tests.

--- libc/posix/bug-regex19.c.jj	2003-11-21 09:48:44.000000000 +0100
+++ libc/posix/bug-regex19.c	2003-11-21 16:22:10.000000000 +0100
@@ -50,6 +50,20 @@ static struct test_s
   {BRE, "\\bA", "C-AA", 2, 2},
   {BRE, "A\\b", "CAA-", 1, 2},
   {BRE, "A\\b", "CAA", 1, 2},
+  {BRE, "\\<[A]", "CBAA", 0, -1},
+  {BRE, "\\<[A]", "CBAA", 2, -1},
+  {BRE, "[A]\\>", "CAAB", 1, -1},
+  {BRE, "\\b[A]", "CBAA", 0, -1},
+  {BRE, "\\b[A]", "CBAA", 2, -1},
+  {BRE, "[A]\\b", "CAAB", 1, -1},
+  {BRE, "\\<[A]", "AA", 0, 0},
+  {BRE, "\\<[A]", "C-AA", 2, 2},
+  {BRE, "[A]\\>", "CAA-", 1, 2},
+  {BRE, "[A]\\>", "CAA", 1, 2},
+  {BRE, "\\b[A]", "AA", 0, 0},
+  {BRE, "\\b[A]", "C-AA", 2, 2},
+  {BRE, "[A]\\b", "CAA-", 1, 2},
+  {BRE, "[A]\\b", "CAA", 1, 2},
   {ERE, "\\b(A|!|.B)", "A=AC", 0, 0},
   {ERE, "\\b(A|!|.B)", "=AC", 0, 1},
   {ERE, "\\b(A|!|.B)", "!AC", 0, 1},
@@ -132,6 +146,66 @@ static struct test_s
   {ERE, ".(\\b|\\B).", "A=C", 0, 0},
   {ERE, ".(\\b|\\B).", "ABC", 0, 0},
   {ERE, ".(\\b|\\B).", "=~\\!", 0, -1},
+  {ERE, "\\b([A]|[!]|.B)", "A=AC", 0, 0},
+  {ERE, "\\b([A]|[!]|.B)", "=AC", 0, 1},
+  {ERE, "\\b([A]|[!]|.B)", "!AC", 0, 1},
+  {ERE, "\\b([A]|[!]|.B)", "=AB", 0, 1},
+  {ERE, "\\b([A]|[!]|.B)", "DA!C", 0, 2},
+  {ERE, "\\b([A]|[!]|.B)", "=CB", 0, 1},
+  {ERE, "\\b([A]|[!]|.B)", "!CB", 0, 1},
+  {ERE, "\\b([A]|[!]|.B)", "D,B", 0, 1},
+  {ERE, "\\b([A]|[!]|.B)", "!.C", 0, -1},
+  {ERE, "\\b([A]|[!]|.B)", "BCB", 0, -1},
+  {ERE, "([A]|\\b)([A]|[B]|[C])", "DAAD", 0, 1},
+  {ERE, "([A]|\\b)([A]|[B]|[C])", "DABD", 0, 1},
+  {ERE, "([A]|\\b)([A]|[B]|[C])", "AD", 0, 0},
+  {ERE, "([A]|\\b)([A]|[B]|[C])", "C!", 0, 0},
+  {ERE, "([A]|\\b)([A]|[B]|[C])", "D,B", 0, 2},
+  {ERE, "([A]|\\b)([A]|[B]|[C])", "DA?A", 0, 3},
+  {ERE, "([A]|\\b)([A]|[B]|[C])", "BBC", 0, 0},
+  {ERE, "([A]|\\b)([A]|[B]|[C])", "DA", 0, -1},
+  {ERE, "([!]|\\b)([!]|[=]|[~])", "A!=\\", 0, 1},
+  {ERE, "([!]|\\b)([!]|[=]|[~])", "/!=A", 0, 1},
+  {ERE, "([!]|\\b)([!]|[=]|[~])", "A=A", 0, 1},
+  {ERE, "([!]|\\b)([!]|[=]|[~])", "==!=", 0, 2},
+  {ERE, "([!]|\\b)([!]|[=]|[~])", "==C~", 0, 3},
+  {ERE, "([!]|\\b)([!]|[=]|[~])", "=~=", 0, -1},
+  {ERE, "([!]|\\b)([!]|[=]|[~])", "~!", 0, -1},
+  {ERE, "([!]|\\b)([!]|[=]|[~])", "~=~", 0, -1},
+  {ERE, "\\<([A]|[!]|.B)", "A=AC", 0, 0},
+  {ERE, "\\<([A]|[!]|.B)", "=AC", 0, 1},
+  {ERE, "\\<([A]|[!]|.B)", "!AC", 0, 1},
+  {ERE, "\\<([A]|[!]|.B)", "=AB", 0, 1},
+  {ERE, "\\<([A]|[!]|.B)", "=CB", 0, 1},
+  {ERE, "\\<([A]|[!]|.B)", "!CB", 0, 1},
+  {ERE, "\\<([A]|[!]|.B)", "DA!C", 0, -1},
+  {ERE, "\\<([A]|[!]|.B)", "D,B", 0, -1},
+  {ERE, "\\<([A]|[!]|.B)", "!.C", 0, -1},
+  {ERE, "\\<([A]|[!]|.B)", "BCB", 0, -1},
+  {ERE, "([A]|\\<)([A]|[B]|[C])", "DAAD", 0, 1},
+  {ERE, "([A]|\\<)([A]|[B]|[C])", "DABD", 0, 1},
+  {ERE, "([A]|\\<)([A]|[B]|[C])", "AD", 0, 0},
+  {ERE, "([A]|\\<)([A]|[B]|[C])", "C!", 0, 0},
+  {ERE, "([A]|\\<)([A]|[B]|[C])", "D,B", 0, 2},
+  {ERE, "([A]|\\<)([A]|[B]|[C])", "DA?A", 0, 3},
+  {ERE, "([A]|\\<)([A]|[B]|[C])", "BBC", 0, 0},
+  {ERE, "([A]|\\<)([A]|[B]|[C])", "DA", 0, -1},
+  {ERE, "([!]|\\<)([!=]|[~])", "A!=\\", 0, 1},
+  {ERE, "([!]|\\<)([!=]|[~])", "/!=A", 0, 1},
+  {ERE, "([!]|\\<)([!=]|[~])", "==!=", 0, 2},
+  {ERE, "([!]|\\<)([!=]|[~])", "==C~", 0, -1},
+  {ERE, "([!]|\\<)([!=]|[~])", "A=A", 0, -1},
+  {ERE, "([!]|\\<)([!=]|[~])", "=~=", 0, -1},
+  {ERE, "([!]|\\<)([!=]|[~])", "~!", 0, -1},
+  {ERE, "([!]|\\<)([!=]|[~])", "~=~", 0, -1},
+  {ERE, "(\\<|[A].)[ABC]", "AC", 0, 0},
+  {ERE, "(\\<|[A].)[ABC]", "=A", 0, 1},
+  {ERE, "(\\<|[A].)[ABC]", "DACC", 0, 1},
+  {ERE, "(\\<|[A].)[A~C]", "AC", 0, 0},
+  {ERE, "(\\<|[A].)[A~C]", "=A", 0, 1},
+  {ERE, "(\\<|[A].)[A~C]", "DACC", 0, 1},
+  {ERE, "(\\<|[A].)[A~C]", "B!A=", 0, 2},
+  {ERE, "(\\<|[A].)[A~C]", "B~C", 0, 2},
 };
 
 int

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] More bug-regex19 tests
  2003-11-21 18:54 [PATCH] More bug-regex19 tests Jakub Jelinek
@ 2003-11-21 23:25 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-11-21 23:25 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jakub Jelinek wrote:

> 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* posix/bug-regex19.c (tests): Add more tests.

Applied.

- -- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/vpUT2ijCOnn/RHQRAs2TAKCt2ExhihrnKWilc3XoEtkVvfMXUACfVoXT
9zD2Jp16UHb+lAiBQf1S0BU=
=v2aG
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-21 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-21 18:54 [PATCH] More bug-regex19 tests Jakub Jelinek
2003-11-21 23:25 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).