]> err.no Git - dak/commitdiff
Simple check for lintian regex
authorChris Lamb <lamby@debian.org>
Tue, 27 Oct 2009 19:43:57 +0000 (19:43 +0000)
committerChris Lamb <lamby@debian.org>
Tue, 27 Oct 2009 19:45:02 +0000 (19:45 +0000)
tests/test_regexes.py

index 7c43d097cecbdc93647b75575eb1c32581beef67..9187a541d20392dd39d1e98390baa59afeb19602 100755 (executable)
@@ -29,3 +29,12 @@ class re_single_line_field(unittest.TestCase):
         self.assertEqual(self.MATCH(': ::').groups(), ('', '::'))
         self.assertEqual(self.MATCH('Foo::bar').groups(), ('Foo', ':bar'))
         self.assertEqual(self.MATCH('Foo: :bar').groups(), ('Foo', ':bar'))
+
+class re_parse_lintian(unittest.TestCase):
+    MATCH = regexes.re_parse_lintian.match
+
+    def testSimple(self):
+        self.assertEqual(
+            self.MATCH('W: tzdata: binary-without-manpage usr/sbin/tzconfig').groups(),
+            ('W', 'tzdata', 'binary-without-manpage', 'usr/sbin/tzconfig')
+        )