Skip to content

Commit 9c20e7e

Browse files
committed
Add test
1 parent 5bbe636 commit 9c20e7e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

test/mustachio/aot_compiler_render_test.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,15 @@ void main() {
259259
expect(output, equals('Text Foo: hello'));
260260
});
261261

262+
test('Renderer renders a value section node keyed lower in the stack',
263+
() async {
264+
var output = await renderBar({
265+
'foo|lib/templates/html/bar.html':
266+
'Text {{#foo}}One {{#s2}}Two{{/s2}}{{/foo}}',
267+
}, '_i1.Bar()..foo = _i1.Foo()..s2 = "hello"');
268+
expect(output, equals('Text One Two'));
269+
});
270+
262271
test('Renderer renders a null value section node as blank', () async {
263272
var output = await renderFoo({
264273
'foo|lib/templates/html/foo.html':

test/mustachio/runtime_renderer_render_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void main() {
208208
..writeAsStringSync('Text {{#foo}}One {{#s2}}Two{{/s2}}{{/foo}}');
209209
var barTemplate = await Template.parse(barTemplateFile);
210210
var bar = Bar()
211-
..foo = (Foo()..s1 = 'goodbye')
211+
..foo = Foo()
212212
..s2 = 'hello';
213213
expect(renderBar(bar, barTemplate), equals('Text One Two'));
214214
});

0 commit comments

Comments
 (0)