{ 3, 3, "[][.-.]-0]", "ab0-]", },
{ 3, 3, "[A-[.].]c]", "ab]!", },
{ 0, 0, "GA122", NULL, },
- { -2, -2, "[[.ch]]", "abc", },
+ { -2, -2, "[[.ch.]]", "abc", },
{ -2, -2, "[[.ab.][.CD.][.EF.]]", "yZabCDEFQ9", },
{ 0, 0, "GA125", NULL, },
{ 2, 2, "[[=a=]b]", "Abc", },
{ -1, -1, "[[=a=]b]", "ABc", },
{ 3, 3, "[^[=a=]b]", "abc", },
{ 0, 0, "GA126", NULL, },
- { 2, 7, "[[:alnum:]]*", " aB28gH", },
- { 2, 5, "[^[:alnum:]]*", "2 ,\7fa", },
- { 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 ,\7fa", },
+ { 2, 5, "[^[:alnum:]][^[:alnum:]]*", "2 ,\7fa", },
+ { 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,\7fa", },
- { 1, 2, "[[:blank:]]*", " \r\7f", },
+ { 1, 2, "[[:blank:]]*", " \r\7f", },
{ 1, 8, "[^[:blank:]]*", "aB28gH,\7f ", },
{ 1, 2, "[[:cntrl:]]*", " \7f ", },
{ 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,\7f", },
{ 1, 7, "[[:graph:]]*", "aB28gH, ", },
{ 1, 3, "[^[:graph:]]*", " \7f,", },
{ 1, 8, "[^[:lower:]]*", "B2 8H,\7fa", },
{ 1, 8, "[[:print:]]*", "aB2 8gH, ", },
{ 1, 2, "[^[:print:]]*", " \7f ", },
- { 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\7f", },
- { 1, 3, "[[:space:]]*", " \r\7f", },
- { 2, 9, "[^[:space:]]*", " aB28gH,\7f ", },
- { 2, 3, "[[:upper:]]*", "aBH2", },
+ { 1, 3, "[[:space:]]*", " \r\7f", },
+ { 0, 0, NULL, "the expected result for [^[:space:]]* is 2-9 which is wrong" },
+ { 0, 0, "[^[:space:]]*", " aB28gH,\7f ", },
+ { 2, 9, "[^[:space:]][^[:space:]]*", " aB28gH,\7f ", },
+ { 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,\7fB", },
- { 2, 5, "[[:xdigit:]]*", "gaB28h", },
- { 2, 7, "[^[:xdigit:]]*", "a gH,\7f2", },
+ { 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,\7f2", },
{ 0, 0, "GA127", NULL, },
{ -2, -2, "[b-a]", "abc", },
{ 1, 1, "[a-c]", "bbccde", },
{ 2, 6, "bc[d-w]xy", "abchxyz", },
{ 0, 0, "GA129", NULL, },
{ 1, 1, "[a-cd-f]", "dbccde", },
- { -1, -1, "[a-ce-f", "dBCCdE", },
+ { -1, -1, "[a-ce-f]", "dBCCdE", },
{ 2, 4, "b[n-zA-M]Y", "absY9Z", },
{ 2, 4, "b[n-zA-M]Y", "abGY9Z", },
{ 0, 0, "GA130", NULL, },
{ 3, 3, "[-xy]", "ac-", },
- { 2, 4, "[c[-xy]D", "ac-D+", },
+ { 2, 4, "c[-xy]D", "ac-D+", },
{ 2, 2, "[--/]", "a.b", },
{ 2, 4, "c[--/]D", "ac.D+b", },
{ 2, 2, "[^-ac]", "abcde-", },
{ 3, 4, "[a-c][e-f]", "acbedf", },
{ 4, 8, "abc*XYZ", "890abXYZ#*", },
{ 4, 9, "abc*XYZ", "890abcXYZ#*", },
- { 4, 15, "abc*XYZ", "890abccccccccXYZ#*", },
+ { 4, 15, "abc*XYZ", "890abcccccccXYZ#*", },
{ -1, -1, "abc*XYZ", "890abc*XYZ#*", },
{ 0, 0, "GA132", NULL, },
{ 2, 4, "\\(*bc\\)", "a*bc", },
{ 1, 20, "a\\(.*b\\)c", "axcaxbbbcsxbbbbbbbbc", },
{ 0, 0, "GA135", NULL, },
{ 1, 7, "\\(a\\(b\\(c\\(d\\(e\\)\\)\\)\\)\\)\\4", "abcdededede", },
- { 1, 2, "a\\(b\\)*c\\1", "acb", },
+ { 0, 0, NULL, "POSIX does not really specify whether a\\(b\\)*c\\1 matches acb." },
+ { 0, 0, NULL, "back references are supposed to expand to the last match, but what" },
+ { 0, 0, NULL, "if there never was a match as in this case?" },
+ { -1, -1, "a\\(b\\)*c\\1", "acb", },
{ 1, 11, "\\(a\\(b\\(c\\(d\\(e\\(f\\(g\\)h\\(i\\(j\\)\\)\\)\\)\\)\\)\\)\\)\\9", "abcdefghijjk", },
{ 0, 0, "GA136", NULL, },
- { 1, 2, "a\\(b\\)*c\\1", "acb", },
- { 4, 7, "a\\(b\\(c\\(d\\(f\\)*\\)\\)\\)\\4", "xYzabcdePQRST", },
+ { 0, 0, NULL, "These two tests have the same problem as the test in GA135. No match" },
+ { 0, 0, NULL, "of a subexpression, why should the back reference be usable?" },
+ { 0, 0, NULL, "1 2 a\\(b\\)*c\\1 acb" },
+ { 0, 0, NULL, "4 7 a\\(b\\(c\\(d\\(f\\)*\\)\\)\\)\\4¦xYzabcdePQRST" },
+ { -1, -1, "a\\(b\\)*c\\1", "acb", },
+ { -1, -1, "a\\(b\\(c\\(d\\(f\\)*\\)\\)\\)\\4", "xYzabcdePQRST", },
{ 0, 0, "GA137", NULL, },
{ -2, -2, "\\(a\\(b\\)\\)\\3", "foo", },
{ -2, -2, "\\(a\\(b\\)\\)\\(a\\(b\\)\\)\\5", "foo", },
{ 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", },
{ 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, },
{ 1, 63, "a\\{1,63\\}", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", },
{ 0, 0, "2.8.3.4 BRE Precedence", NULL, },
{ 0, 0, "GA143", NULL, },
- { 2, 20, "\\^\\[[[.].]]\\\\(\\\\1\\\\)\\\\*\\\\{1,2\\\\}\\$", "a^[]\\(1\\)\\*\\{1,2\\}$b", },
+ { 0, 0, NULL, "There are numerous bugs in the original version." },
+ { 2, 19, "\\^\\[[[.].]]\\\\(\\\\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", },
{ 1, 1, "^a", "abc", },
{ -1, -1, "^b", "abc", },
{ -1, -1, "^[a-zA-Z]", "99Nine", },
- { 1, 4, "^[a-zA-Z]", "Nine99", },
+ { 1, 4, "^[a-zA-Z]*", "Nine99", },
{ 0, 0, "GA145(1)", NULL, },
{ 1, 2, "\\(^a\\)\\1", "aabc", },
{ -1, -1, "\\(^a\\)\\1", "^a^abc", },
{ 3, 3, "a$", "cba", },
{ -1, -1, "a$", "abc", },
{ 5, 7, "[a-z]*$", "99ZZxyz", },
- { -1, -1, "[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$", },