diff --git a/test/utility.js b/test/utility.js index 763a48036..8314c7017 100644 --- a/test/utility.js +++ b/test/utility.js @@ -55,6 +55,19 @@ $(document).ready(function() { var customQuote = _.template("It's its, not it's"); equals(customQuote({}), "It's its, not it's"); + _.templateSettings = { + start : '', + interpolate : /<\?=(.+?)\?>/g + }; + + var customWithSpecialChars = _.template(""); + result = customWithSpecialChars({people : {moe : "Moe", larry : "Larry", curly : "Curly"}}); + equals(result, "", 'can run arbitrary javascript in templates'); + + var customWithSpecialCharsQuote = _.template("It's its, not it's"); + equals(customWithSpecialCharsQuote({}), "It's its, not it's"); + _.templateSettings = { start : '{{', end : '}}',