From 4b1bdf44231dc201757803732ad140217a9539dc Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 28 Oct 2015 14:30:05 -0400 Subject: [PATCH] Test: Added test to make sure 'ids' compresses consecutive IDs into a range --- test/ids.t | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/ids.t b/test/ids.t index d97c46a5d..7d7891820 100755 --- a/test/ids.t +++ b/test/ids.t @@ -88,6 +88,12 @@ class TestIDs(TestCase): self.assertRegexpMatches( out, "{0}:one\n{0}:two\n{0}:three\n{0}:five".format(UUID_REGEXP)) + def test_ids_ranges(self): + """Verify consecutive IDs are compressed into a range""" + code, out, err = self.t("1 2 3 4 5 ids") + self.assertIn("1-5", out) + + class TestIDMisParse(TestCase): def setUp(self): """Executed before each test in the class"""