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