Skip to content

Commit 7c3bc53

Browse files
committed
indentation tests (currently exhibiting poor results)
1 parent d21c4d6 commit 7c3bc53

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

bin/test/inheritance.t/run.t

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,20 @@ https://github.com/mustache/spec/pull/75
1212
<h1>Hello world</h1>
1313
</body>
1414
</html>
15+
16+
17+
We also test the indentation of parameter blocks.
18+
19+
$ mustache data.json test-indent-more.mustache
20+
<p>
21+
The test below should be indented in the same way as this line.
22+
This text is not indented in the source,
23+
it should be indented naturally in the output.
24+
</p>
25+
26+
$ mustache data.json test-indent-less.mustache
27+
<p>
28+
The test below should be indented in the same way as this line.
29+
This text is very indented in the source,
30+
it should be indented naturally in the output.
31+
</p>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{<test-indentation}}
2+
{{$indented-block}}
3+
This text is very indented in the source,
4+
it should be indented naturally in the output.
5+
{{/indented-block}}
6+
{{/test-indentation}}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{<test-indentation}}
2+
{{$indented-block}}
3+
This text is not indented in the source,
4+
it should be indented naturally in the output.
5+
{{/indented-block}}
6+
{{/test-indentation}}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<p>
2+
The test below should be indented in the same way as this line.
3+
{{$indented-block}}{{/indented-block}}
4+
</p>

0 commit comments

Comments
 (0)