From 528184be255835c455c69c4754a09dbe456a9139 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 18 Jan 2013 09:28:55 -0500 Subject: GroupPatterns: improved PackedDigitRange and tests --- .../Testsrc/Testlib/TestServer/TestPlugins/TestGroupPatterns.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'testsuite') diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestGroupPatterns.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestGroupPatterns.py index 84d35ccc5..a7a6b3d6e 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestGroupPatterns.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestGroupPatterns.py @@ -22,13 +22,14 @@ class TestPackedDigitRange(Bcfg2TestCase): def test_includes(self): # tuples of (range description, numbers that are included, # numebrs that are excluded) - tests = [("1-3", [1, "2", 3], [4, "0"]), - ("1", [1], [0, 2]), + tests = [("1-3", [1, "2", 3], [4]), + ("1", [1], [0, "2"]), ("10-11", [10, 11], [0, 1]), ("9-9", [9], [8, 10]), ("0-100", [0, 10, 99, 100], []), ("1,3,5", [1, 3, 5], [0, 2, 4, 6]), ("1-5,7", [1, 3, 5, 7], [0, 6, 8]), + ("1-5,7,9-11", [1, 3, 5, 7, 9, 11], [0, 6, 8, 12]), ("852-855,321-497,763", [852, 855, 321, 400, 497, 763], [])] for rng, inc, exc in tests: r = PackedDigitRange(rng) -- cgit v1.2.3-1-g7c22