2003-11-12  Ulrich Drepper  <drepper@redhat.com>

	* posix/PTESTS: Cleanup.  Fix typoes.  Correct bugs in 2003.2.
	* posix/runptests.c (main): Handle comments.
	* posix/PTESTS2C.sed: Handle comments.
This commit is contained in:
Ulrich Drepper 2003-11-13 01:04:26 +00:00
parent 14744156b9
commit 813ec65a4d
5 changed files with 91 additions and 34 deletions

View File

@ -1,3 +1,9 @@
2003-11-12 Ulrich Drepper <drepper@redhat.com>
* posix/PTESTS: Cleanup. Fix typoes. Correct bugs in 2003.2.
* posix/runptests.c (main): Handle comments.
* posix/PTESTS2C.sed: Handle comments.
2003-11-12 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c (optimize_utf8): New function.

View File

@ -123,15 +123,23 @@
-1¦-1¦[[=a=]b]¦ABc¦
3¦3¦[^[=a=]b]¦abc¦
# GA126
2¦7¦[[:alnum:]]*¦ aB28gH¦
2¦5¦[^[:alnum:]]*¦2 ,
2¦5¦[[:alpha:]]*¦ aBgH2¦
#W the expected result for [[:alnum:]]* is 2-7 which is wrong
0¦0¦[[:alnum:]]*¦ aB28gH¦
2¦7¦[[:alnum:]][[:alnum:]]*¦ aB28gH¦
#W the expected result for [^[:alnum:]]* is 2-5 which is wrong
0¦0¦[^[:alnum:]]*¦2 ,
2¦5¦[^[:alnum:]][^[:alnum:]]*¦2 ,
#W the expected result for [[:alpha:]]* is 2-5 which is wrong
0¦0¦[[:alpha:]]*¦ aBgH2¦
2¦5¦[[:alpha:]][[:alpha:]]*¦ aBgH2¦
1¦6¦[^[:alpha:]]*¦2 8,
1¦2¦[[:blank:]]*¦ ¦
1¦8¦[^[:blank:]]*¦aB28gH, ¦
1¦2¦[[:cntrl:]]*¦  ¦
1¦8¦[^[:cntrl:]]*¦aB2 8gh,¦
2¦3¦[[:digit:]]*¦a28¦
#W the expected result for [[:digit:]]* is 2-3 which is wrong
0¦0¦[[:digit:]]*¦a28¦
2¦3¦[[:digit:]][[:digit:]]*¦a28¦
1¦8¦[^[:digit:]]*¦aB gH,¦
1¦7¦[[:graph:]]*¦aB28gH, ¦
1¦3¦[^[:graph:]]*¦ 
@ -139,14 +147,23 @@
1¦8¦[^[:lower:]]*¦B2 8H,
1¦8¦[[:print:]]*¦aB2 8gH, ¦
1¦2¦[^[:print:]]*¦  ¦
2¦2¦[[:punct:]]*¦a,2¦
#W the expected result for [[:punct:]]* is 2-2 which is wrong
0¦0¦[[:punct:]]*¦a,2¦
2¦3¦[[:punct:]][[:punct:]]*¦a,,2¦
1¦9¦[^[:punct:]]*¦aB2 8gH¦
1¦3¦[[:space:]]*¦ ¦
2¦9¦[^[:space:]]*¦ aB28gH, ¦
2¦3¦[[:upper:]]*¦aBH2¦
#W the expected result for [^[:space:]]* is 2-9 which is wrong
0¦0¦[^[:space:]]*¦ aB28gH, ¦
2¦9¦[^[:space:]][^[:space:]]*¦ aB28gH, ¦
#W the expected result for [[:upper:]]* is 2-3 which is wrong
0¦0¦[[:upper:]]*¦aBH2¦
2¦3¦[[:upper:]][[:upper:]]*¦aBH2¦
1¦8¦[^[:upper:]]*¦a2 8g,
2¦5¦[[:xdigit:]]*¦gaB28h¦
2¦7¦[^[:xdigit:]]*¦a gH,
#W the expected result for [[:xdigit:]]* is 2-5 which is wrong
0¦0¦[[:xdigit:]]*¦gaB28h¦
2¦5¦[[:xdigit:]][[:xdigit:]]*¦gaB28h¦
#W the expected result for [^[:xdigit:]]* is 2-7 which is wrong
2¦7¦[^[:xdigit:]][^[:xdigit:]]*¦a gH,
# GA127
-2¦-2¦[b-a]¦abc¦
1¦1¦[a-c]¦bbccde¦
@ -232,8 +249,9 @@
1¦2¦a\{2\}¦aaaa¦
1¦7¦\([a-c]*\)\{0,\}¦aabcaab¦
1¦2¦\(a\)\1\{1,2\}¦aabc¦
1¦3¦\(a\)010\{1,2\}¦aaaabc¦
1¦4¦\(\(a\)\1\)\{1,2\}¦aaaabc¦
1¦3¦\(a\)\1\{1,2\}¦aaaabc¦
#W the expression \(\(a\)\1\)\{1,2\} is ill-formed, using \2
1¦4¦\(\(a\)\2\)\{1,2\}¦aaaabc¦
# GA140
1¦2¦a\{2\}¦aaaa¦
-1¦-1¦a\{2\}¦abcd¦
@ -241,7 +259,8 @@
1¦64¦a\{64\}¦aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa¦
# GA141
1¦7¦\([a-c]*\)\{0,\}¦aabcaab¦
-1¦-1¦\([a-c]*\)\{2,\}¦abcdefg¦
#W the expected result for \([a-c]*\)\{2,\} is failure which isn't correct
1¦3¦\([a-c]*\)\{2,\}¦abcdefg¦
1¦3¦\([a-c]*\)\{1,\}¦abcdefg¦
-1¦-1¦a\{64,\}¦aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa¦
# GA142
@ -253,11 +272,15 @@
# GA143
2¦20¦\^\[[[.].]]\\(\\1\\)\\*\\{1,2\\}\$¦a^[]\(1\)\*\{1,2\}$b¦
1¦6¦[[=*=]][[=\=]][[=]=]][[===]][[...]][[:punct:]]¦*\]=.;¦
1¦6¦[$\(*\)1]*¦$\()*^¦
1¦6¦[$\(*\)^]*¦$\()*^¦
1¦1¦[\1]¦1¦
1¦1¦[\{1,2\}]¦{¦
2¦2¦\(*\)*\1*¦a*b*11¦
1¦5¦\(a\(b\{1,2\}\)\{1,2\}\)¦abbab¦
#W the expected result for \(*\)*\1* is 2-2 which isn't correct
0¦0¦\(*\)*\1*¦a*b*11¦
2¦3¦\(*\)*\1*b¦a*b*11¦
#W the expected result for \(a\(b\{1,2\}\)\{1,2\}\) is 1-5 which isn't correct
1¦3¦\(a\(b\{1,2\}\)\{1,2\}\)¦abbab¦
1¦5¦\(a\(b\{1,2\}\)\)\{1,2\}¦abbab¦
1¦1¦^\(^\(^a$\)$\)$¦a¦
1¦2¦\(a\)\1$¦aa¦
1¦3¦ab*¦abb¦
@ -284,7 +307,8 @@
3¦3¦a$¦cba¦
-1¦-1¦a$¦abc¦
5¦7¦[a-z]*$¦99ZZxyz¦
9¦9¦[a-z]*$¦99ZZxyz99¦
#W the expected result for [a-z]*$ is failure which isn't correct
10¦9¦[a-z]*$¦99ZZxyz99¦
3¦3¦$$¦ab$¦
-1¦-1¦$$¦$ab¦
3¦3¦\$$¦ab$¦

View File

@ -1,5 +1,6 @@
/^##/d
s/# \(.*\)/ { 0, 0, "\1", NULL, },/
s/^# \(.*\)/ { 0, 0, "\1", NULL, },/
s/^#W \(.*\)/ { 0, 0, NULL, "\1" },/
s/\([^ヲ]*\)ヲ\([^ヲ]*\)ヲ\([^ヲ]*\)ヲ\([^ヲ]*\)ヲ\(.*\)/ { \1, \2, "\3", "\4", \5 },/
s/\\/\\\\/g
s/ /\\r/g

View File

@ -118,15 +118,23 @@
{ -1, -1, "[[=a=]b]", "ABc", },
{ 3, 3, "[^[=a=]b]", "abc", },
{ 0, 0, "GA126", NULL, },
{ 2, 7, "[[:alnum:]]*", " aB28gH", },
{ 2, 5, "[^[:alnum:]]*", "2 ,a", },
{ 2, 5, "[[:alpha:]]*", " aBgH2", },
{ 0, 0, NULL, "the expected result for [[:alnum:]]* is 2-7 which is wrong" },
{ 0, 0, "[[:alnum:]]*", " aB28gH", },
{ 2, 7, "[[:alnum:]][[:alnum:]]*", " aB28gH", },
{ 0, 0, NULL, "the expected result for [^[:alnum:]]* is 2-5 which is wrong" },
{ 0, 0, "[^[:alnum:]]*", "2 ,a", },
{ 2, 5, "[^[:alnum:]][^[:alnum:]]*", "2 ,a", },
{ 0, 0, NULL, "the expected result for [[:alpha:]]* is 2-5 which is wrong" },
{ 0, 0, "[[:alpha:]]*", " aBgH2", },
{ 2, 5, "[[:alpha:]][[:alpha:]]*", " aBgH2", },
{ 1, 6, "[^[:alpha:]]*", "2 8,a", },
{ 1, 2, "[[:blank:]]*", " \r", },
{ 1, 8, "[^[:blank:]]*", "aB28gH, ", },
{ 1, 2, "[[:cntrl:]]*", "  ", },
{ 1, 8, "[^[:cntrl:]]*", "aB2 8gh,", },
{ 2, 3, "[[:digit:]]*", "a28", },
{ 0, 0, NULL, "the expected result for [[:digit:]]* is 2-3 which is wrong" },
{ 0, 0, "[[:digit:]]*", "a28", },
{ 2, 3, "[[:digit:]][[:digit:]]*", "a28", },
{ 1, 8, "[^[:digit:]]*", "aB gH,", },
{ 1, 7, "[[:graph:]]*", "aB28gH, ", },
{ 1, 3, "[^[:graph:]]*", " ,", },
@ -134,14 +142,23 @@
{ 1, 8, "[^[:lower:]]*", "B2 8H,a", },
{ 1, 8, "[[:print:]]*", "aB2 8gH, ", },
{ 1, 2, "[^[:print:]]*", "  ", },
{ 2, 2, "[[:punct:]]*", "a,2", },
{ 0, 0, NULL, "the expected result for [[:punct:]]* is 2-2 which is wrong" },
{ 0, 0, "[[:punct:]]*", "a,2", },
{ 2, 3, "[[:punct:]][[:punct:]]*", "a,,2", },
{ 1, 9, "[^[:punct:]]*", "aB2 8gH", },
{ 1, 3, "[[:space:]]*", " \r", },
{ 2, 9, "[^[:space:]]*", " aB28gH, ", },
{ 2, 3, "[[:upper:]]*", "aBH2", },
{ 0, 0, NULL, "the expected result for [^[:space:]]* is 2-9 which is wrong" },
{ 0, 0, "[^[:space:]]*", " aB28gH, ", },
{ 2, 9, "[^[:space:]][^[:space:]]*", " aB28gH, ", },
{ 0, 0, NULL, "the expected result for [[:upper:]]* is 2-3 which is wrong" },
{ 0, 0, "[[:upper:]]*", "aBH2", },
{ 2, 3, "[[:upper:]][[:upper:]]*", "aBH2", },
{ 1, 8, "[^[:upper:]]*", "a2 8g,B", },
{ 2, 5, "[[:xdigit:]]*", "gaB28h", },
{ 2, 7, "[^[:xdigit:]]*", "a gH,2", },
{ 0, 0, NULL, "the expected result for [[:xdigit:]]* is 2-5 which is wrong" },
{ 0, 0, "[[:xdigit:]]*", "gaB28h", },
{ 2, 5, "[[:xdigit:]][[:xdigit:]]*", "gaB28h", },
{ 0, 0, NULL, "the expected result for [^[:xdigit:]]* is 2-7 which is wrong" },
{ 2, 7, "[^[:xdigit:]][^[:xdigit:]]*", "a gH,2", },
{ 0, 0, "GA127", NULL, },
{ -2, -2, "[b-a]", "abc", },
{ 1, 1, "[a-c]", "bbccde", },
@ -227,8 +244,9 @@
{ 1, 2, "a\\{2\\}", "aaaa", },
{ 1, 7, "\\([a-c]*\\)\\{0,\\}", "aabcaab", },
{ 1, 2, "\\(a\\)\\1\\{1,2\\}", "aabc", },
{ 1, 3, "\\(a\\)010\\{1,2\\}", "aaaabc", },
{ 1, 4, "\\(\\(a\\)\\1\\)\\{1,2\\}", "aaaabc", },
{ 1, 3, "\\(a\\)\\1\\{1,2\\}", "aaaabc", },
{ 0, 0, NULL, "the expression \\(\\(a\\)\\1\\)\\{1,2\\} is ill-formed, using \\2" },
{ 1, 4, "\\(\\(a\\)\\2\\)\\{1,2\\}", "aaaabc", },
{ 0, 0, "GA140", NULL, },
{ 1, 2, "a\\{2\\}", "aaaa", },
{ -1, -1, "a\\{2\\}", "abcd", },
@ -236,7 +254,8 @@
{ 1, 64, "a\\{64\\}", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", },
{ 0, 0, "GA141", NULL, },
{ 1, 7, "\\([a-c]*\\)\\{0,\\}", "aabcaab", },
{ -1, -1, "\\([a-c]*\\)\\{2,\\}", "abcdefg", },
{ 0, 0, NULL, "the expected result for \\([a-c]*\\)\\{2,\\} is failure which isn't correct" },
{ 1, 3, "\\([a-c]*\\)\\{2,\\}", "abcdefg", },
{ 1, 3, "\\([a-c]*\\)\\{1,\\}", "abcdefg", },
{ -1, -1, "a\\{64,\\}", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", },
{ 0, 0, "GA142", NULL, },
@ -248,11 +267,15 @@
{ 0, 0, "GA143", NULL, },
{ 2, 20, "\\^\\[[[.].]]\\\\(\\\\1\\\\)\\\\*\\\\{1,2\\\\}\\$", "a^[]\\(1\\)\\*\\{1,2\\}$b", },
{ 1, 6, "[[=*=]][[=\\=]][[=]=]][[===]][[...]][[:punct:]]", "*\\]=.;", },
{ 1, 6, "[$\\(*\\)1]*", "$\\()*^", },
{ 1, 6, "[$\\(*\\)^]*", "$\\()*^", },
{ 1, 1, "[\\1]", "1", },
{ 1, 1, "[\\{1,2\\}]", "{", },
{ 2, 2, "\\(*\\)*\\1*", "a*b*11", },
{ 1, 5, "\\(a\\(b\\{1,2\\}\\)\\{1,2\\}\\)", "abbab", },
{ 0, 0, NULL, "the expected result for \\(*\\)*\\1* is 2-2 which isn't correct" },
{ 0, 0, "\\(*\\)*\\1*", "a*b*11", },
{ 2, 3, "\\(*\\)*\\1*b", "a*b*11", },
{ 0, 0, NULL, "the expected result for \\(a\\(b\\{1,2\\}\\)\\{1,2\\}\\) is 1-5 which isn't correct" },
{ 1, 3, "\\(a\\(b\\{1,2\\}\\)\\{1,2\\}\\)", "abbab", },
{ 1, 5, "\\(a\\(b\\{1,2\\}\\)\\)\\{1,2\\}", "abbab", },
{ 1, 1, "^\\(^\\(^a$\\)$\\)$", "a", },
{ 1, 2, "\\(a\\)\\1$", "aa", },
{ 1, 3, "ab*", "abb", },
@ -274,7 +297,8 @@
{ 3, 3, "a$", "cba", },
{ -1, -1, "a$", "abc", },
{ 5, 7, "[a-z]*$", "99ZZxyz", },
{ 9, 9, "[a-z]*$", "99ZZxyz99", },
{ 0, 0, NULL, "the expected result for [a-z]*$ is failure which isn't correct" },
{ 10, 9, "[a-z]*$", "99ZZxyz99", },
{ 3, 3, "$$", "ab$", },
{ -1, -1, "$$", "$ab", },
{ 3, 3, "\\$$", "ab$", },

View File

@ -1,5 +1,5 @@
/* POSIX regex testsuite from IEEE 2003.2.
Copyright (C) 1998 Free Software Foundation, Inc.
Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@ -50,6 +50,8 @@ main (int argc, char *argv[])
(int) strlen (tests[cnt].reg),
"-----------------------------------------------------");
}
else if (tests[cnt].reg == NULL)
printf ("!!! %s\n", tests[cnt].str);
else
{
regex_t re;