diff --git a/test/TestInventory.py b/test/TestInventory.py index f2035231d4..3a1cae1e4f 100644 --- a/test/TestInventory.py +++ b/test/TestInventory.py @@ -286,6 +286,11 @@ class TestInventory(unittest.TestCase): def test_alpha_end_before_beg(self): Inventory(os.path.join(self.test_dir, 'inventory','test_alpha_end_before_beg')) + def test_combined_range(self): + i = Inventory(os.path.join(self.test_dir, 'inventory','test_combined_range')) + hosts = i.list_hosts('test') + expected_hosts=['host1A','host2A','host1B','host2B'] + assert sorted(hosts) == sorted(expected_hosts) ################################################### ### Inventory API tests diff --git a/test/inventory/test_combined_range b/test/inventory/test_combined_range new file mode 100644 index 0000000000..cbcb41753e --- /dev/null +++ b/test/inventory/test_combined_range @@ -0,0 +1,2 @@ +[test] +host[1:2][A:B]