Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests to describe bugs from #1261 and #997. #1264

Closed
wants to merge 7 commits into from
4 changes: 4 additions & 0 deletions test/cases/layout.append.block-with-include.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<p>in head</p>
<p>in head include</p>
<p>body</p>
<p>body include</p>
9 changes: 9 additions & 0 deletions test/cases/layout.append.block-with-include.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends ../fixtures/block-in-block/layout

append head
p in head

block body
p body

include ../fixtures/block-in-block/include
4 changes: 4 additions & 0 deletions test/cases/layout.append.in-block-2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<p>in head</p>
<p>in body in append head</p>
<p>body</p>
<p>body 2</p>
10 changes: 10 additions & 0 deletions test/cases/layout.append.in-block-2.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extends ../fixtures/block-in-block/layout

append head
p in head

block body
p body
append head
p in body in append head
p body 2
3 changes: 3 additions & 0 deletions test/cases/layout.append.in-block.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>in body in append head</p>
<p>body</p>
<p>body 2</p>
7 changes: 7 additions & 0 deletions test/cases/layout.append.in-block.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends ../fixtures/block-in-block/layout

block body
p body
append head
p in body in append head
p body 2
3 changes: 3 additions & 0 deletions test/cases/layout.append.in-same-block.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>body</p>
<p>body 2</p>
<p>in body in append body</p>
7 changes: 7 additions & 0 deletions test/cases/layout.append.in-same-block.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends ../fixtures/block-in-block/layout

block body
p body
append body
p in body in append body
p body 2
4 changes: 4 additions & 0 deletions test/cases/layout.append.with-include.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<p>in head</p>
<p>in head include</p>
<p>body</p>
<p>body include</p>
9 changes: 9 additions & 0 deletions test/cases/layout.append.with-include.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends ../fixtures/block-in-block/layout

append head
p in head

append body
p body

include ../fixtures/block-in-block/include
1 change: 1 addition & 0 deletions test/cases/layout.block.in-block.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>in body in append head</p>
6 changes: 6 additions & 0 deletions test/cases/layout.block.in-block.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends ../fixtures/block-in-block/layout

block body
p body
block body
p in body in append head

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo. p in body in replace body or something like that would be more appropriate here. ;)

Taking my thoughts on #1271 into account this once again highlights the ambiguity of the block my-block statement.

5 changes: 5 additions & 0 deletions test/fixtures/block-in-block/include.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
append head
p in head include

append body
p body include
2 changes: 2 additions & 0 deletions test/fixtures/block-in-block/layout.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
block head
block body