mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 12:27:49 +00:00
Added failing test for quotes in statements with regex-significant characters in tokens
This commit is contained in:
@@ -42,6 +42,9 @@ $(document).ready(function() {
|
|||||||
var quoteTemplate = _.template("It's its, not it's");
|
var quoteTemplate = _.template("It's its, not it's");
|
||||||
equals(quoteTemplate({}), "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 = {
|
_.templateSettings = {
|
||||||
start : '{{',
|
start : '{{',
|
||||||
end : '}}',
|
end : '}}',
|
||||||
@@ -55,6 +58,9 @@ $(document).ready(function() {
|
|||||||
var customQuote = _.template("It's its, not it's");
|
var customQuote = _.template("It's its, not it's");
|
||||||
equals(customQuote({}), "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 = {
|
_.templateSettings = {
|
||||||
start : '<?',
|
start : '<?',
|
||||||
end : '?>',
|
end : '?>',
|
||||||
@@ -68,6 +74,9 @@ $(document).ready(function() {
|
|||||||
var customWithSpecialCharsQuote = _.template("It's its, not it's");
|
var customWithSpecialCharsQuote = _.template("It's its, not it's");
|
||||||
equals(customWithSpecialCharsQuote({}), "It's its, not it's");
|
equals(customWithSpecialCharsQuote({}), "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 = {
|
_.templateSettings = {
|
||||||
start : '{{',
|
start : '{{',
|
||||||
end : '}}',
|
end : '}}',
|
||||||
|
|||||||
Reference in New Issue
Block a user