mirror of
https://github.com/esphome/esphome.git
synced 2026-08-23 06:36:23 +00:00
Drop the escaping test duplicated by the shared ninja module tests
This commit is contained in:
@@ -640,19 +640,6 @@ def test_project_flags_requotes_lexed_defines() -> None:
|
||||
assert compile_flags == ['"-DGREETING=hello world"']
|
||||
|
||||
|
||||
def test_shell_token_escaping() -> None:
|
||||
"""Tokens survive both POSIX sh and the Windows CRT argv parser."""
|
||||
assert arduino8266._shell_token("-Os") == "-Os"
|
||||
# $ would be expanded (to nothing) by ninja itself
|
||||
assert arduino8266._shell_token("-DX=$HOME") == "-DX=$$HOME"
|
||||
# Backslashes not before a quote stay single (Windows path in a define)
|
||||
assert arduino8266._shell_token("-DP=C:\\x y") == '"-DP=C:\\x y"'
|
||||
# A quote is escaped and the preceding backslash run doubles
|
||||
assert arduino8266._shell_token('-DX=a\\"b c') == '"-DX=a\\\\\\"b c"'
|
||||
# A trailing backslash run doubles before the closing quote
|
||||
assert arduino8266._shell_token("a b\\") == '"a b\\\\"'
|
||||
|
||||
|
||||
def test_write_project_empty_core_raises(tmp_path: Path) -> None:
|
||||
"""A framework tree with no core sources fails at generation, not link."""
|
||||
paths = _make_framework(tmp_path)
|
||||
|
||||
Reference in New Issue
Block a user