示例#1
0
 def test_symbol_2(self):
     # E.g.
     #   s a b b
     # p 1 0 0 0
     # a 0 1 0 0
     # b 0 0 1 0
     # * 0 1 1 1
     s = "abb"
     p = "ab*"
     self.assertTrue(regex_matching.is_match(s, p))
示例#2
0
 def test_symbol_1(self):
     s = "a"
     p = "ab*"
     self.assertTrue(regex_matching.is_match(s, p))
示例#3
0
 def test_no_symbol_not_equal_1(self):
     s = "ab"
     p = "abb"
     self.assertFalse(regex_matching.is_match(s, p))
示例#4
0
 def test_no_symbol_not_equal_0(self):
     s = "abcd"
     p = "efgh"
     self.assertFalse(regex_matching.is_match(s, p))
示例#5
0
 def test_no_symbol_equal(self):
     s = "abcd"
     p = "abcd"
     self.assertTrue(regex_matching.is_match(s, p))
示例#6
0
 def test_none_1(self):
     s = ""
     p = "a"
     self.assertFalse(regex_matching.is_match(s, p))
示例#7
0
 def test_none_0(self):
     s = ""
     p = ""
     self.assertTrue(regex_matching.is_match(s, p))