예제 #1
0
 def test_no_match_four(self):
     regexp = RegexpADP('hello')
     self.assertEqual(regexp.match("hell"), [])
예제 #2
0
 def test_match_question_dot_one(self):
     regexp = RegexpADP('hell?.')
     self.assertEqual(regexp.match("hello"), ["hell", "hello"])
예제 #3
0
 def test_no_match_four(self):
     regexp = RegexpADP('hello')
     self.assertEqual(regexp.match("hell"), [])
예제 #4
0
 def test_no_match_one(self):
     regexp = RegexpADP('hello')
     self.assertEqual(regexp.match("world"), [])
예제 #5
0
 def test_match_star_three(self):
     regexp = RegexpADP('hello*world')
     self.assertEqual(regexp.match("hellooooworld"), ['hellooooworld'])
예제 #6
0
 def test_match_question_two(self):
     regexp = RegexpADP('hello?world')
     self.assertEqual(regexp.match("hellworld"), ["hellworld"])
예제 #7
0
 def test_match_question_five(self):
     regexp = RegexpADP('abcd?efg')
     self.assertEqual(regexp.match("abcdefg"), ['abcdefg'])
예제 #8
0
 def test_match_question_six(self):
     regexp = RegexpADP('abcd?efg')
     self.assertEqual(regexp.match("bcefg"), [])
예제 #9
0
 def test_match_question_seven(self):
     regexp = RegexpADP('ab')
     self.assertEqual(regexp.match("aaaabbbb"), ['ab'])
예제 #10
0
 def test_match_question_four(self):
     regexp = RegexpADP('helo?world')
     self.assertEqual(regexp.match("helloworld"), [])
예제 #11
0
 def test_match_question_five(self):
     regexp = RegexpADP('abcd?efg')
     self.assertEqual(regexp.match("abcdefg"), ['abcdefg'])
예제 #12
0
 def test_match_question_two(self):
     regexp = RegexpADP('hello?world')
     self.assertEqual(regexp.match("hellworld"), ["hellworld"])
예제 #13
0
 def test_match_dot_three(self):
     regexp = RegexpADP('hello..orld')
     self.assertEqual(regexp.match(
         "hello-world helloworld hello,world hello world"),
         ["hello-world", "hello,world", "hello world"])
예제 #14
0
 def test_match_dot_one(self):
     regexp = RegexpADP('hello.world')
     self.assertEqual(regexp.match("hello|world"), ["hello|world"])
예제 #15
0
 def test_match_dot_one(self):
     regexp = RegexpADP('hello.world')
     self.assertEqual(regexp.match("hello|world"), ["hello|world"])
예제 #16
0
 def test_no_match_one(self):
     regexp = RegexpADP('hello')
     self.assertEqual(regexp.match("world"), [])
예제 #17
0
 def test_match_dot_three(self):
     regexp = RegexpADP('hello..orld')
     self.assertEqual(
         regexp.match("hello-world helloworld hello,world hello world"),
         ["hello-world", "hello,world", "hello world"])
예제 #18
0
 def test_match_star_three(self):
     regexp = RegexpADP('hello*world')
     self.assertEqual(regexp.match("hellooooworld"), ['hellooooworld'])
예제 #19
0
 def test_match_question_four(self):
     regexp = RegexpADP('helo?world')
     self.assertEqual(regexp.match("helloworld"), [])
예제 #20
0
 def test_match_star_four(self):
     regexp = RegexpADP('hello*world')
     self.assertEqual(regexp.match("heloworld"), [])
예제 #21
0
 def test_match_question_six(self):
     regexp = RegexpADP('abcd?efg')
     self.assertEqual(regexp.match("bcefg"), [])
예제 #22
0
 def test_match_question_dot_one(self):
     regexp = RegexpADP('hell?.')
     self.assertEqual(regexp.match("hello"), ["hell", "hello"])
예제 #23
0
 def test_match_question_seven(self):
     regexp = RegexpADP('ab')
     self.assertEqual(regexp.match("aaaabbbb"), ['ab'])
예제 #24
0
 def test_match_question_dot_two(self):
     regexp = RegexpADP('hell?.')
     self.assertEqual(regexp.match("help"), ["help"])
예제 #25
0
 def test_match_star_four(self):
     regexp = RegexpADP('hello*world')
     self.assertEqual(regexp.match("heloworld"), [])
예제 #26
0
 def test_no_match_three(self):
     regexp = RegexpADP('')
     self.assertEqual(regexp.match("helloworld"), [])
예제 #27
0
 def test_match_question_dot_two(self):
     regexp = RegexpADP('hell?.')
     self.assertEqual(regexp.match("help"), ["help"])
예제 #28
0
 def test_no_match_three(self):
     regexp = RegexpADP('')
     self.assertEqual(regexp.match("helloworld"), [])