diff --git a/test/utility.js b/test/utility.js index 8314c7017..b693390fe 100644 --- a/test/utility.js +++ b/test/utility.js @@ -42,6 +42,9 @@ $(document).ready(function() { var quoteTemplate = _.template("It's its, not it's"); equals(quoteTemplate({}), "It's its, not it's"); + var quoteInStatementAndBody = _.template("<% if(foo == 'bar'){ %>Statement quotes and 'quotes'.<% } %>"); + equals(quoteInStatementAndBody({foo: "bar"}), "Statement quotes and 'quotes'."); + _.templateSettings = { start : '{{', end : '}}', @@ -55,6 +58,9 @@ $(document).ready(function() { var customQuote = _.template("It's its, not it's"); equals(customQuote({}), "It's its, not it's"); + var quoteInStatementAndBody = _.template("{{ if(foo == 'bar'){ }}Statement quotes and 'quotes'.{{ } }}"); + equals(quoteInStatementAndBody({foo: "bar"}), "Statement quotes and 'quotes'."); + _.templateSettings = { start : '', @@ -68,6 +74,9 @@ $(document).ready(function() { var customWithSpecialCharsQuote = _.template("It's its, not it's"); equals(customWithSpecialCharsQuote({}), "It's its, not it's"); + var quoteInStatementAndBody = _.template("Statement quotes and 'quotes'."); + equals(quoteInStatementAndBody({foo: "bar"}), "Statement quotes and 'quotes'."); + _.templateSettings = { start : '{{', end : '}}',