Skip to content

Commit

Permalink
Add mixed syntax tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pitaj committed Jul 14, 2018
1 parent fa4e4e2 commit 2dd742b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/templates/expected/mixed-syntax.html
@@ -0,0 +1,12 @@
<div id="container">
<a data-func="webrtc.joinRoom" data-room="test" href="#" class="list-group-item">
<h4 class="list-group-item-heading">Test</h4>
<p class="list-group-item-text">testing</p>
</a>
</div>


<a data-func="webrtc.joinRoom" data-room="test" href="#" class="list-group-item">
<h4 class="list-group-item-heading">Test</h4>
<p class="list-group-item-text">testing</p>
</a>
34 changes: 34 additions & 0 deletions tests/templates/source/mixed-syntax.tpl
@@ -0,0 +1,34 @@
<div id="container">
<!-- IF rooms.length -->
<!-- BEGIN rooms -->
<!-- IF !rooms.private -->
<a data-func="webrtc.joinRoom" data-room="{rooms.slug}" href="#" class="list-group-item">
<h4 class="list-group-item-heading">{rooms.name}</h4>
<p class="list-group-item-text">{rooms.description}</p>
</a>
<!-- ENDIF !rooms.private -->
<!-- END rooms -->
<!-- ELSE -->
<a data-func="webrtc.newRoom" href="#" class="list-group-item">
<h4 class="list-group-item-heading">No rooms currently available!</h4>
<p class="list-group-item-text">Click here to create one!</p>
</a>
<!-- ENDIF rooms.length -->
</div><!-- END container -->


{{{if rooms.length}}}
<!-- BEGIN rooms -->
{{{if !rooms.private}}}
<a data-func="webrtc.joinRoom" data-room="{rooms.slug}" href="#" class="list-group-item">
<h4 class="list-group-item-heading">{rooms.name}</h4>
<p class="list-group-item-text">{rooms.description}</p><!-- END description -->
</a>
<!-- ENDIF !rooms.private -->
{{{ end }}}
<!-- ELSE -->
<a data-func="webrtc.newRoom" href="#" class="list-group-item">
<h4 class="list-group-item-heading">No rooms currently available!</h4>
<p class="list-group-item-text">Click here to create one!</p><!-- END -->
</a>
<!-- ENDIF rooms.length -->

0 comments on commit 2dd742b

Please sign in to comment.