Added tests for trailing - in ranges, for example [a-b-].

[SVN r31534]
This commit is contained in:
John Maddock
2005-11-01 18:06:59 +00:00
parent 8a06157b46
commit b3433fc7c8

View File

@ -37,6 +37,8 @@ void test_sets()
TEST_REGEX_SEARCH("a[^]b]c", extended, "adc", match_default, make_array(0, 3, -2, -2));
TEST_REGEX_SEARCH("a[^-b]c", extended, "adc", match_default, make_array(0, 3, -2, -2));
TEST_REGEX_SEARCH("a[b-]c", extended, "a-c", match_default, make_array(0, 3, -2, -2));
TEST_REGEX_SEARCH("a[a-z-]c", extended, "a-c", match_default, make_array(0, 3, -2, -2));
TEST_REGEX_SEARCH("a[a-z-]+c", extended, "aaz-c", match_default, make_array(0, 5, -2, -2));
TEST_INVALID_REGEX("a[b", extended);
TEST_INVALID_REGEX("a[", extended);
TEST_INVALID_REGEX("a[]", extended);