comparison tests/test_externals.py @ 761:979148947967

svnexternals: generate externals with a revision placeholder This is the first step to separate source URL from revision identifier as required by subrepos.
author Patrick Mezard <pmezard@gmail.com>
date Thu, 25 Nov 2010 21:55:21 +0100
parents d2ef7220a079
children c31a1f92e1c6
comparison
equal deleted inserted replaced
760:bf1c27a89c76 761:979148947967
32 32
33 def test_parsedefinitions(self): 33 def test_parsedefinitions(self):
34 # Taken from svn book 34 # Taken from svn book
35 samples = [ 35 samples = [
36 ('third-party/sounds http://svn.example.com/repos/sounds', 36 ('third-party/sounds http://svn.example.com/repos/sounds',
37 ('third-party/sounds', None, 'http://svn.example.com/repos/sounds', None)), 37 ('third-party/sounds', None, 'http://svn.example.com/repos/sounds', None,
38 'third-party/sounds http://svn.example.com/repos/sounds')),
39
38 ('third-party/skins -r148 http://svn.example.com/skinproj', 40 ('third-party/skins -r148 http://svn.example.com/skinproj',
39 ('third-party/skins', '148', 'http://svn.example.com/skinproj', None)), 41 ('third-party/skins', '148', 'http://svn.example.com/skinproj', None,
42 'third-party/skins -r{REV} http://svn.example.com/skinproj')),
43
40 ('third-party/skins -r 148 http://svn.example.com/skinproj', 44 ('third-party/skins -r 148 http://svn.example.com/skinproj',
41 ('third-party/skins', '148', 'http://svn.example.com/skinproj', None)), 45 ('third-party/skins', '148', 'http://svn.example.com/skinproj', None,
46 'third-party/skins -r {REV} http://svn.example.com/skinproj')),
47
42 ('http://svn.example.com/repos/sounds third-party/sounds', 48 ('http://svn.example.com/repos/sounds third-party/sounds',
43 ('third-party/sounds', None, 'http://svn.example.com/repos/sounds', None)), 49 ('third-party/sounds', None, 'http://svn.example.com/repos/sounds', None,
50 'http://svn.example.com/repos/sounds third-party/sounds')),
51
44 ('-r148 http://svn.example.com/skinproj third-party/skins', 52 ('-r148 http://svn.example.com/skinproj third-party/skins',
45 ('third-party/skins', '148', 'http://svn.example.com/skinproj', None)), 53 ('third-party/skins', '148', 'http://svn.example.com/skinproj', None,
54 '-r{REV} http://svn.example.com/skinproj third-party/skins')),
55
46 ('-r 148 http://svn.example.com/skinproj third-party/skins', 56 ('-r 148 http://svn.example.com/skinproj third-party/skins',
47 ('third-party/skins', '148', 'http://svn.example.com/skinproj', None)), 57 ('third-party/skins', '148', 'http://svn.example.com/skinproj', None,
58 '-r {REV} http://svn.example.com/skinproj third-party/skins')),
59
48 ('http://svn.example.com/skin-maker@21 third-party/skins/toolkit', 60 ('http://svn.example.com/skin-maker@21 third-party/skins/toolkit',
49 ('third-party/skins/toolkit', None, 'http://svn.example.com/skin-maker', '21')), 61 ('third-party/skins/toolkit', None, 'http://svn.example.com/skin-maker', '21',
62 'http://svn.example.com/skin-maker@21 third-party/skins/toolkit')),
50 ] 63 ]
51 64
52 for line, expected in samples: 65 for line, expected in samples:
53 self.assertEqual(expected, svnexternals.parsedefinition(line)) 66 self.assertEqual(expected, svnexternals.parsedefinition(line))
54 67