mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
Fail on a declared-but-absent extraScript, warn once per unsupported env method, split and widen tests
This commit is contained in:
@@ -538,12 +538,15 @@ def test_split_flag_entry_unbalanced_quote_is_clean() -> None:
|
||||
from esphome.platformio.library import split_flag_entry
|
||||
|
||||
assert split_flag_entry('-DX="a b"', "library x") == ["-DX=a b"]
|
||||
# join_flag_args re-glues a spaced -D like ParseFlags does
|
||||
with pytest.raises(EsphomeError, match=r"Malformed build flag.*library x"):
|
||||
split_flag_entry('-DX="unclosed', "library x")
|
||||
|
||||
|
||||
def test_join_flag_args_reglues_spaced_define() -> None:
|
||||
"""A spaced -D re-glues to its argument, as ParseFlags does."""
|
||||
from esphome.platformio.library import join_flag_args
|
||||
|
||||
assert join_flag_args(["-D", "FOO=1", "-Os"], "x") == ["-DFOO=1", "-Os"]
|
||||
with pytest.raises(EsphomeError, match=r"Malformed build flag.*library x"):
|
||||
split_flag_entry('-DX="unclosed', "library x")
|
||||
|
||||
|
||||
def test_join_flag_args_trailing_bare_flag_warns(
|
||||
|
||||
Reference in New Issue
Block a user