diff --git a/common/utils/StringUtils.cpp b/common/utils/StringUtils.cpp index 9068743bf..749ad7967 100644 --- a/common/utils/StringUtils.cpp +++ b/common/utils/StringUtils.cpp @@ -488,18 +488,22 @@ void CapitalizeLabel(string *s) { void CustomCapitalizeLabel(string *s) { // Remember to update the Doxygen in include/ola/StringUtils.h too static const char* const transforms[] = { + "asc", "dhcp", "dmx", "dns", "ip", "ipv4", // Should really be IPv4 probably, but better than nothing "ipv6", // Should really be IPv6 probably, but better than nothing + "json", "led", "mdmx", // City Theatrical, should really be mDMX, but better than nothing + "nsc", "pdl", "pid", "rdm", "uid", + "url", NULL }; const size_t size = s->size(); diff --git a/include/ola/StringUtils.h b/include/ola/StringUtils.h index c1bd47ca0..0f7675d39 100644 --- a/include/ola/StringUtils.h +++ b/include/ola/StringUtils.h @@ -490,16 +490,20 @@ void CapitalizeLabel(std::string *s); * * @param s a string to transform. * The following are capitalized: + * - asc * - dhcp * - dmx * - dns * - ip * - ipv4 * - ipv6 + * - json * - led * - mdmx + * - nsc * - rdm * - uid + * - url */ void CustomCapitalizeLabel(std::string *s); diff --git a/tools/rdm/TestDefinitions.py b/tools/rdm/TestDefinitions.py index e97b0f58b..6f793d1a0 100644 --- a/tools/rdm/TestDefinitions.py +++ b/tools/rdm/TestDefinitions.py @@ -7280,9 +7280,11 @@ def VerifyResult(self, response, fields): return interfaces = [] + count_by_interface = {} for interface in fields['interfaces']: interface_id = interface['interface_identifier'] + count_by_interface[interface_id] = count_by_interface.get(interface_id, 0) + 1 if (interface_id < RDM_INTERFACE_INDEX_MIN or interface_id > RDM_INTERFACE_INDEX_MAX): self.AddWarning('Interface index %d is outside allowed range (%d to ' @@ -7297,6 +7299,12 @@ def VerifyResult(self, response, fields): 'interface %d' % (interface['interface_hardware_type'], interface_id)) + # Check for duplicate interfaces + for interface, count in count_by_interface.items(): + if count > 1: + self.AddAdvisory('Interface %s listed %d times in list interfaces' % + (interface, count)) + self.SetProperty(self.PROVIDES[0], interfaces)