From a7febfbf05acb71b41248a854914bb3ec97c19d2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 21 Aug 2026 12:26:23 -0500 Subject: [PATCH] Track the per-platform shell quoting in the requote drift test --- tests/unit_tests/build_gen/test_arduino8266.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unit_tests/build_gen/test_arduino8266.py b/tests/unit_tests/build_gen/test_arduino8266.py index 5c91e54cc1..e7ea3b6e77 100644 --- a/tests/unit_tests/build_gen/test_arduino8266.py +++ b/tests/unit_tests/build_gen/test_arduino8266.py @@ -11,6 +11,7 @@ toolchain produces for the same configuration. from __future__ import annotations from collections.abc import Generator +import os from pathlib import Path from unittest.mock import MagicMock, patch @@ -400,7 +401,10 @@ def test_project_flags_requotes_lexed_defines() -> None: ) # shlex folds the quotes (as PIO's ParseFlags does); _shell_token # re-quotes the spaced token so the shell passes one argv element - assert compile_flags == ['"-DGREETING=hello world"'] + expected = ( + '"-DGREETING=hello world"' if os.name == "nt" else "'-DGREETING=hello world'" + ) + assert compile_flags == [expected] def test_flag_defines_joins_spaced_define() -> None: