Additional tests for trailing '-' in range expressions.

[SVN r31511]
This commit is contained in:
John Maddock
2005-10-31 11:09:54 +00:00
parent 1de4cd12f5
commit fc4f4ade1a

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);