예제 #1
0
파일: utils_test.py 프로젝트: Roche/salt
 def test_build_whitespace_split_regex(self):
     expected_regex = '(?m)^(?:[\\s]+)?Lorem(?:[\\s]+)?ipsum(?:[\\s]+)?dolor(?:[\\s]+)?sit(?:[\\s]+)?amet\\,' \
                      '(?:[\\s]+)?$'
     ret = utils.build_whitespace_split_regex(' '.join(LORUM_IPSUM.split()[:5]))
     self.assertEqual(ret, expected_regex)
예제 #2
0
 def test_issue_2227(self):
     regex = build_whitespace_split_regex(SINGLE_DOUBLE_SAME_LINE_TXT)
     self.assertTrue(re.search(regex, MATCH))
예제 #3
0
 def test_single_and_double_quotes(self):
     regex = build_whitespace_split_regex(SINGLE_DOUBLE_TXT)
     self.assertTrue(re.search(regex, MATCH))
예제 #4
0
 def test_build_whitespace_split_regex(self):
     expected_regex = '(?m)^(?:[\\s]+)?Lorem(?:[\\s]+)?ipsum(?:[\\s]+)?dolor(?:[\\s]+)?sit(?:[\\s]+)?amet\\,' \
                      '(?:[\\s]+)?$'
     ret = utils.build_whitespace_split_regex(' '.join(LORUM_IPSUM.split()[:5]))
     self.assertEqual(ret, expected_regex)
 def test_single_and_double_quotes(self):
     regex = build_whitespace_split_regex(SINGLE_DOUBLE_TXT)
     self.assertTrue(re.search(regex, MATCH))
 def test_issue_2227(self):
     regex = build_whitespace_split_regex(SINGLE_DOUBLE_SAME_LINE_TXT)
     self.assertTrue(re.search(regex, MATCH))