From 9889710033b9e6961ed62f52f8dfadf8aa166639 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 6 Aug 2025 11:51:11 +0100 Subject: [PATCH] Tests: Allow whitespace around fuzzy-matching configurations Several WPT tests have a space after the semicolon, for example https://wpt.live/css/css-images/gradient/gradient-single-stop-001.html : ``` ``` --- Tests/LibWeb/test-web/Fuzzy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/LibWeb/test-web/Fuzzy.cpp b/Tests/LibWeb/test-web/Fuzzy.cpp index fdf8d16232a..3f9ab8a4f1c 100644 --- a/Tests/LibWeb/test-web/Fuzzy.cpp +++ b/Tests/LibWeb/test-web/Fuzzy.cpp @@ -79,7 +79,7 @@ ErrorOr parse_fuzzy_match(Optional reference, Strin Optional color_value_error; Optional pixel_error_count; for (auto [i, config_part] : enumerate(config_parts)) { - auto named_parts = MUST(config_part.split_limit('=', 2)); + auto named_parts = MUST(MUST(config_part.trim_ascii_whitespace()).split_limit('=', 2)); if (named_parts.is_empty()) return Error::from_string_view("Fuzzy configuration value cannot be empty"sv);