Skip to content

Commit

Permalink
Add test for %> and -%> interspersed
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed Feb 1, 2015
1 parent ce74af3 commit dc842ec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/ejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ suite('%>', function () {
assert.equal(ejs.render(fixture('newlines.ejs'), {users: users}),
fixture('newlines.html'));
});
test('works with `-%>` interspersed', function () {
assert.equal(ejs.render(fixture('newlines.mixed.ejs'), {users: users}),
fixture('newlines.mixed.html'));
});
test('consecutive tags work', function () {
assert.equal(ejs.render(fixture('consecutive-tags.ejs')),
fixture('consecutive-tags.html'));
Expand Down
6 changes: 6 additions & 0 deletions test/fixtures/newlines.mixed.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<ul>
<% var unused1 = 'blah' -%>
<% var unused2 = 'bleh' %>
<% var unused3 = 'bloh' -%>
<% var unused4 = 'bluh' %>
</ul>
4 changes: 4 additions & 0 deletions test/fixtures/newlines.mixed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<ul>


</ul>

0 comments on commit dc842ec

Please sign in to comment.