diff test/test_listpackages.py @ 253:7d932fac1055

Add --newest=N option to listpackages to get more than one newest revision. Add corresponding tests.
author Bernhard Herzog <bh@intevation.de>
date Tue, 14 Apr 2009 12:45:12 +0000
parents 2e0b373414b8
children faeeac2c4c71
line wrap: on
line diff
--- a/test/test_listpackages.py	Tue Apr 14 09:41:59 2009 +0000
+++ b/test/test_listpackages.py	Tue Apr 14 12:45:12 2009 +0000
@@ -225,6 +225,53 @@
 kdepimlibs/pkg/803692-4322/binary/kdepimlibs_1.0.1.803692-1_i386.deb""")
 
 
+class TestListPackagesNNewest(ListPackagesTest):
+
+    track_files = [package_track_files("kdepim", "1.0.1",
+                                       ["kdepim", "kleopatra"],
+                                       [(701865, 28),
+                                        (700345, 28),
+                                        (702432, 28),
+                                        (704195, 31, "error")]),
+                   package_track_files("kdepimlibs", "1.0.1",
+                                       ["kdepimlibs"],
+                                       [(700298, 34),
+                                        (700345, 34),
+                                        (701866, 34, "error"),
+                                        (701866, 35),
+                                        (702436, 35)]),
+                   ]
+
+    def test_listpackages_source(self):
+        self.check_cmd(["--source", "--newest=2"],
+                       """\
+kdepim/pkg/700345-28/src/kdepim_1.0.1.700345-1.diff.gz
+kdepim/pkg/700345-28/src/kdepim_1.0.1.700345-1.dsc
+kdepim/pkg/700345-28/src/kdepim_1.0.1.700345.orig.tar.gz
+kdepim/pkg/702432-28/src/kdepim_1.0.1.702432-1.diff.gz
+kdepim/pkg/702432-28/src/kdepim_1.0.1.702432-1.dsc
+kdepim/pkg/702432-28/src/kdepim_1.0.1.702432.orig.tar.gz
+kdepimlibs/pkg/701866-35/src/kdepimlibs_1.0.1.701866-1.diff.gz
+kdepimlibs/pkg/701866-35/src/kdepimlibs_1.0.1.701866-1.dsc
+kdepimlibs/pkg/701866-35/src/kdepimlibs_1.0.1.701866.orig.tar.gz
+kdepimlibs/pkg/702436-35/src/kdepimlibs_1.0.1.702436-1.diff.gz
+kdepimlibs/pkg/702436-35/src/kdepimlibs_1.0.1.702436-1.dsc
+kdepimlibs/pkg/702436-35/src/kdepimlibs_1.0.1.702436.orig.tar.gz""")
+
+    def test_listpackages_binary(self):
+        self.check_cmd(["--binary", "--newest=3"],
+                       """\
+kdepim/pkg/700345-28/binary/kdepim_1.0.1.700345-1_i386.deb
+kdepim/pkg/700345-28/binary/kleopatra_1.0.1.700345-1_i386.deb
+kdepim/pkg/701865-28/binary/kdepim_1.0.1.701865-1_i386.deb
+kdepim/pkg/701865-28/binary/kleopatra_1.0.1.701865-1_i386.deb
+kdepim/pkg/702432-28/binary/kdepim_1.0.1.702432-1_i386.deb
+kdepim/pkg/702432-28/binary/kleopatra_1.0.1.702432-1_i386.deb
+kdepimlibs/pkg/700345-34/binary/kdepimlibs_1.0.1.700345-1_i386.deb
+kdepimlibs/pkg/701866-35/binary/kdepimlibs_1.0.1.701866-1_i386.deb
+kdepimlibs/pkg/702436-35/binary/kdepimlibs_1.0.1.702436-1_i386.deb""")
+
+
 class TestListPackagesTrackRevision(ListPackagesTest):
 
     track_files = [package_track_files("kdepim", "1.0.1",
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)