Mercurial > piecrust2
diff tests/bakes/test_linker.yaml @ 401:8e1e55ad35fb
linker: Fix error when trying to list non-existing children.
Add unit tests.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 18 May 2015 23:32:43 -0700 |
parents | |
children | 27b10024f8d8 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/bakes/test_linker.yaml Mon May 18 23:32:43 2015 -0700 @@ -0,0 +1,48 @@ +--- +in: + pages/foo.md: | + {%for c in family.children%} + {{c.title}} + {%endfor%} +outfiles: + foo.html: '' +--- +in: + pages/foo.md: | + {%for c in family.children-%} + {{c.title}} + {%endfor%} + pages/foo/one.md: | + --- + title: One + --- + pages/foo/two.md: | + --- + title: Two + --- +outfiles: + foo.html: | + One + Two +--- +in: + pages/foo.md: | + --- + title: Foo + --- + {%for c in family.siblings-%} + {{c.title}}{%if c.is_self%} SELFIE!{%endif%} + {%endfor%} + pages/bar.md: | + --- + title: Bar + --- + pages/other.md: | + --- + title: Other + --- +outfiles: + foo.html: | + Bar + Foo SELFIE! + Other