diff --git a/test/units/TestInventory.py b/test/units/TestInventory.py index e8f85adbd4a..65da05dba3c 100644 --- a/test/units/TestInventory.py +++ b/test/units/TestInventory.py @@ -274,6 +274,14 @@ class TestInventory(unittest.TestCase): print "EXPECTED=%s" % sorted(expected_hosts) assert sorted(hosts) == sorted(expected_hosts) + def test_regex_grouping(self): + inventory = self.simple_inventory() + hosts = inventory.list_hosts("~(cer[a-z]|berc)(erus00[13])") + expected_hosts = ['cerberus001', 'cerberus003'] + print "HOSTS=%s" % sorted(hosts) + print "EXPECTED=%s" % sorted(expected_hosts) + assert sorted(hosts) == sorted(expected_hosts) + def test_complex_enumeration(self):