[csw-devel] SF.net SVN: gar:[11371] csw/mgar/gar/v2/lib/python/opencsw_test.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Fri Oct 22 09:59:37 CEST 2010
Revision: 11371
http://gar.svn.sourceforge.net/gar/?rev=11371&view=rev
Author: wahwah
Date: 2010-10-22 07:59:37 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
mGAR v2: patchpkg, an additional test case for more REV entries.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/opencsw_test.py
Modified: csw/mgar/gar/v2/lib/python/opencsw_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/opencsw_test.py 2010-10-22 07:59:19 UTC (rev 11370)
+++ csw/mgar/gar/v2/lib/python/opencsw_test.py 2010-10-22 07:59:37 UTC (rev 11371)
@@ -159,12 +159,28 @@
class ComposePackageFileNameUnitTest(unittest.TestCase):
+ def setUp(self):
+ self.parsed = {'arch': 'i386',
+ 'catalogname': 'mysql5client',
+ 'full_version_string': '5.0.87,REV=2010.02.28',
+ 'osrel': 'SunOS5.8',
+ 'revision_info': {'REV': '2010.02.28'},
+ 'vendortag': 'CSW',
+ 'version': '5.0.87',
+ 'version_info': {'major version': '5',
+ 'minor version': '0',
+ 'patchlevel': '87'}}
+
def testSimple(self):
file_name = 'mysql5client-5.0.87,REV=2010.02.28-SunOS5.8-i386-CSW.pkg.gz'
- parsed = opencsw.ParsePackageFileName(file_name)
- self.assertEquals(file_name, opencsw.ComposePackageFileName(parsed))
+ self.assertEquals(file_name, opencsw.ComposePackageFileName(self.parsed))
+ def testMoreRev(self):
+ file_name = 'mysql5client-5.0.87,REV=2010.02.28,foo=bar-SunOS5.8-i386-CSW.pkg.gz'
+ self.parsed["revision_info"]["foo"] = "bar"
+ self.assertEquals(file_name, opencsw.ComposePackageFileName(self.parsed))
+
class ParseVersionStringTest(unittest.TestCase):
def test_NoRev(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list