From 51a679d60a02b3fbea6eac89f52813aa3b123deb Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 5 Jul 2012 13:19:45 -0400 Subject: [PATCH] Add `_.template` unit test to ensure complex "interpolate" delimiters work. Former-commit-id: bdfdbf00b1a1838e104919214012a9cfb39dda19 --- test/test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test.js b/test/test.js index 2e46e4207..b6e61311b 100644 --- a/test/test.js +++ b/test/test.js @@ -669,6 +669,13 @@ _.template('', null, options); deepEqual(options, {}); }); + + test('should work with complex "interpolate" delimiters', function() { + var compiled = _.template('<%= a + b %>'), + data = { 'a': 1, 'b': 2 }; + + equal(compiled(data), 3); + }); }()); /*--------------------------------------------------------------------------*/