From da64c42dc22ef4dd5b6f718fc6269bfbb376c225 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 28 Feb 2025 08:52:34 +0100 Subject: [PATCH] Add tests --- tests/ErrorTest.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/ErrorTest.php b/tests/ErrorTest.php index db310cb4f..43ab90708 100644 --- a/tests/ErrorTest.php +++ b/tests/ErrorTest.php @@ -416,6 +416,31 @@ EOHTML, ], 'index', 3, ], + + // error occurs in an embed tag + [ + [ + 'index' => " + {% embed 'base' %} + {% endembed %}", + 'base' => '{% block foo %}{{ foo.bar }}{% endblock %}', + ], + 'base', 1, + ], + + // error occurs in an overridden block from an embed tag + [ + [ + 'index' => " + {% embed 'base' %} + {% block foo %} + {{ foo.bar }} + {% endblock %} + {% endembed %}", + 'base' => '{% block foo %}{% endblock %}', + ], + 'index', 4, + ], ]; }