Navigation Menu

Skip to content

Commit

Permalink
Testcase for issue #38
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyten committed Apr 4, 2012
1 parent 2d98192 commit 5f22278
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
12 changes: 12 additions & 0 deletions tests/escaping.05.yate
@@ -0,0 +1,12 @@
var = "<"
var2 = "&"
match / {
<tag a="<" b="{var}">
@c=var
</>
<tag a="&" b="{var2}">
@c=var2
</>
<tag a="<" b="{var}"/>
<tag a="&" b="{var2}"/>
}
13 changes: 10 additions & 3 deletions tests/tests.js
Expand Up @@ -143,15 +143,22 @@ module.exports = [
yate: 'escaping.02.yate',
result: '<h1>&lt;b&gt;Some &amp;text&lt;/b&gt;</h1>'
},
{
description: 'escape xml text',
yate: 'escaping.03.yate',
result: '<h1>&lt;b&gt;Some &amp;text&lt;/b&gt;</h1>'
},
{
description: 'escape text inside interpolation',
yate: 'escaping.04.yate',
result: '&lt;b&gt;Some &amp;text&lt;/b&gt;'
},
{
description: 'escape xml text',
yate: 'escaping.03.yate',
result: '<h1>&lt;b&gt;Some &amp;text&lt;/b&gt;</h1>'
description: 'attributes overescaping',
yate: 'escaping.05.yate',
result: '<tag a="&lt;" b="&lt;" c="&lt;"></tag><tag a="&amp;" b="&amp;" c="&amp;"></tag>'+
'<tag a="&lt;" b="&lt;"></tag><tag a="&amp;" b="&amp;"></tag>',
known: true
},
]
},
Expand Down

0 comments on commit 5f22278

Please sign in to comment.