diff --git a/tests/util/test_comm_helpers.py b/tests/util/test_comm_helpers.py index 32926470f..4a0fb4e0e 100644 --- a/tests/util/test_comm_helpers.py +++ b/tests/util/test_comm_helpers.py @@ -376,6 +376,25 @@ class TestCommHelpers(unittest.TestCase): "UUID": "00000000-0000-0000-0000-000000000000", }, ), + # Test firmware name with time created + ( + "FIRMWARE_NAME:Marlin 2.0.7.2 (Nov 27 2020 14:30:11) SOURCE_CODE_URL:https://github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Ender 5 Pro EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff", + { + "FIRMWARE_NAME": "Marlin 2.0.7.2 (Nov 27 2020 14:30:11)", + "SOURCE_CODE_URL": "https://github.com/MarlinFirmware/Marlin", + "PROTOCOL_VERSION": "1.0", + "MACHINE_TYPE": "Ender 5 Pro", + "EXTRUDER_COUNT": "1", + "UUID": "cede2a2f-41a2-4748-9b12-c55c62f367ff", + } + ), + # Test that keys beginning with _ or number are ignored + ( + "KEY1:VALUE1 _KEY2:INVALID 123:INVALID", + { + "KEY1": "VALUE1 _", "KEY2": "INVALID 123:INVALID" + } + ) ) @unpack def test_parse_firmware_line(self, line, expected):