This commit is contained in:
J. Nick Koston
2025-10-26 01:03:15 -07:00
parent 9e77ece7ce
commit 23207f0074
6 changed files with 35 additions and 46 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ def test_text_config_value_mode_set(generate_main):
def test_text_config_lamda_is_set(generate_main):
"""
Test if lambda is set for lambda mode
Test if lambda is set for lambda mode (optimized with stateless lambda)
"""
# Given
@@ -66,5 +66,5 @@ def test_text_config_lamda_is_set(generate_main):
main_cpp = generate_main("tests/component_tests/text/test_text.yaml")
# Then
assert "it_4->set_template([=]() -> esphome::optional<std::string> {" in main_cpp
assert "it_4->set_template(+[]() -> esphome::optional<std::string> {" in main_cpp
assert 'return std::string{"Hello"};' in main_cpp