]> git.ipfire.org Git - thirdparty/git.git/blobdiff - test-ctype.c
Add is_regex_special()
[thirdparty/git.git] / test-ctype.c
index d6425d5b40b6849d63a4f6b924fb2eb3dbded9e7..033c74911ed035ed36b16b0e2bf7327d6cdc5823 100644 (file)
@@ -26,6 +26,11 @@ static int test_is_glob_special(int c)
        return is_glob_special(c);
 }
 
+static int test_is_regex_special(int c)
+{
+       return is_regex_special(c);
+}
+
 #define DIGIT "0123456789"
 #define LOWER "abcdefghijklmnopqrstuvwxyz"
 #define UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -40,6 +45,7 @@ static const struct ctype_class {
        { "isalpha", test_isalpha, LOWER UPPER },
        { "isalnum", test_isalnum, LOWER UPPER DIGIT },
        { "is_glob_special", test_is_glob_special, "*?[\\" },
+       { "is_regex_special", test_is_regex_special, "$()*+.?[\\^{|" },
        { NULL }
 };