about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-21 22:43:47 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-21 22:43:47 +0000
commit73163a09732e60a6c16fcf73635091acd307bef4 (patch)
tree973461c1c01118cebc12bb7e3fc8a13a7a09d002
parent3ccd8d2767d1cf107742022cd1bc839e372126b5 (diff)
downloadglibc-73163a09732e60a6c16fcf73635091acd307bef4.tar.gz
glibc-73163a09732e60a6c16fcf73635091acd307bef4.tar.xz
glibc-73163a09732e60a6c16fcf73635091acd307bef4.zip
Update.
	* posix/bug-regex19.c (tests): Add more tests.
-rw-r--r--ChangeLog2
-rw-r--r--posix/bug-regex19.c74
2 files changed, 76 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8e5834b560..a8f060087c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
 
+	* posix/bug-regex19.c (tests): Add more tests.
+
 	* posix/bug-regex11.c: And one more commented out test.
 
 	* posix/tst-rxspencer.c (mb_tests): Don't run identical multi-byte
diff --git a/posix/bug-regex19.c b/posix/bug-regex19.c
index 53d5640c63..01093e60ac 100644
--- a/posix/bug-regex19.c
+++ b/posix/bug-regex19.c
@@ -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