Mercurial > hgsubversion
comparison tests/test_fetch_command_regexes.py @ 25:99f8e4b535e9
svn 1.4 and 1.5 have different ideas of diff output for prop changes.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 09 Oct 2008 23:37:22 -0500 |
parents | 48a44546c12f |
children | e2214c8fc91f |
comparison
equal
deleted
inserted
replaced
24:5954a514ae26 | 25:99f8e4b535e9 |
---|---|
27 | 27 |
28 Index: trunk/functional_tests/doc_tests/test_doctest_fixtures/doctest_fixtures.rst | 28 Index: trunk/functional_tests/doc_tests/test_doctest_fixtures/doctest_fixtures.rst |
29 =================================================================== | 29 =================================================================== |
30 """ | 30 """ |
31 | 31 |
32 special_delta = """Index: delta | |
33 =================================================================== | |
34 --- delta(revision 0) | |
35 +++ delta(revision 9) | |
36 @@ -0,0 +1 @@ | |
37 +link alpha | |
38 \ No newline at end of file | |
39 | |
40 Property changes on: delta | |
41 ___________________________________________________________________ | |
42 Name: svn:special | |
43 + * | |
44 | |
45 """ | |
46 | |
32 class RegexTests(unittest.TestCase): | 47 class RegexTests(unittest.TestCase): |
33 def test_empty_file_re(self): | 48 def test_empty_file_re(self): |
34 matches = fetch_command.empty_file_patch_wont_make_re.findall(two_empties) | 49 matches = fetch_command.empty_file_patch_wont_make_re.findall(two_empties) |
35 assert sorted(matches) == ['__init__.py', 'bar/__init__.py'] | 50 assert sorted(matches) == ['__init__.py', 'bar/__init__.py'] |
36 | 51 |
37 def test_any_matches_just_one(self): | 52 def test_any_matches_just_one(self): |
38 pat = '''Index: trunk/django/contrib/admin/urls/__init__.py | 53 pat = '''Index: trunk/django/contrib/admin/urls/__init__.py |
39 =================================================================== | 54 =================================================================== |
40 ''' | 55 ''' |
41 matches = fetch_command.any_file_re.findall(pat) | 56 matches = fetch_command.any_file_re.findall(pat) |
42 assert len(matches) == 1 | 57 assert len(matches) == 1 |
43 | 58 |
59 def test_special_re(self): | |
60 matches = fetch_command.property_special_set_re.findall(special_delta) | |
61 assert len(matches) == 1 | |
62 | |
44 def test_any_file_re(self): | 63 def test_any_file_re(self): |
45 matches = fetch_command.any_file_re.findall(two_empties) | 64 matches = fetch_command.any_file_re.findall(two_empties) |
46 assert sorted(matches) == ['__init__.py', 'bar/__init__.py', | 65 assert sorted(matches) == ['__init__.py', 'bar/__init__.py', |
47 'bar/test_muhaha.py'] | 66 'bar/test_muhaha.py'] |
48 | 67 |