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