38
40
u'name "%s" does match glob "%s" (re=%s)' %
39
41
(name, glob, globster._regex_patterns[0][0].pattern)))
41
def test_char_groups(self):
42
# The definition of digit this uses includes arabic digits from
43
# non-latin scripts (arabic, indic, etc.) and subscript/superscript
44
# digits, but neither roman numerals nor vulgar fractions.
43
def test_char_group_digit(self):
45
# The definition of digit this uses includes arabic digits from
46
# non-latin scripts (arabic, indic, etc.) and subscript/superscript
47
# digits, but neither roman numerals nor vulgar fractions.
47
49
[u'0', u'5', u'\u0663', u'\u06f9', u'\u0f21', u'\xb9'],
48
50
[u'T', u'q', u' ', u'\u8336', u'.']),
52
[u'T', u'q', u' ', u'\u8336', u'.'],
53
[u'0', u'5', u'\u0663', u'\u06f9', u'\u0f21', u'\xb9']),
55
# test basename matcher
56
self.assertMatch(matchset)
57
# test fullpath matcher
58
self.assertMatch(matchset, glob_prefix='./')
60
def test_char_group_space(self):
50
63
[u' ', u'\t', u'\n', u'\xa0', u'\u2000', u'\u2002'],
51
64
[u'a', u'-', u'\u8336', u'.']),
53
66
[u'a', u'-', u'\u8336', u'.'],
54
67
[u' ', u'\t', u'\n', u'\xa0', u'\u2000', u'\u2002']),
69
# test basename matcher
70
self.assertMatch(matchset)
71
# test fullpath matcher
72
self.assertMatch(matchset, glob_prefix='./')
74
def test_char_group_alnum(self):
56
77
[u'a', u'Z', u'\u017e', u'\u8336'],
57
78
[u':', u'-', u'\u25cf', u'.']),
59
80
[u':', u'-', u'\u25cf', u'.'],
83
# test basename matcher
84
self.assertMatch(matchset)
85
# test fullpath matcher
86
self.assertMatch(matchset, glob_prefix='./')
88
def test_char_group_ascii(self):
62
91
[u'a', u'Q', u'^', u'.'],
63
92
[u'\xcc', u'\u8336']),
65
94
[u'\xcc', u'\u8336'],
66
95
[u'a', u'Q', u'^', u'.']),
97
# test basename matcher
98
self.assertMatch(matchset)
99
# test fullpath matcher
100
self.assertMatch(matchset, glob_prefix='./')
102
def test_char_group_blank(self):
69
106
[u'x', u'y', u'z', u'.']),
71
108
[u'x', u'y', u'z', u'.'],
111
# test basename matcher
112
self.assertMatch(matchset)
113
# test fullpath matcher
114
self.assertMatch(matchset, glob_prefix='./')
116
def test_char_group_cntrl(self):
74
119
[u'\b', u'\t', '\x7f'],
75
120
[u'a', u'Q', u'\u8336', u'.']),
122
[u'a', u'Q', u'\u8336', u'.'],
123
[u'\b', u'\t', '\x7f']),
125
# test basename matcher
126
self.assertMatch(matchset)
127
# test fullpath matcher
128
self.assertMatch(matchset, glob_prefix='./')
130
def test_char_groups(self):
77
133
[u'a', u'q', u'f'],
78
134
[u'A', u'Q', u'F']),