Add _.template unit test to ensure complex "interpolate" delimiters work.

Former-commit-id: bdfdbf00b1a1838e104919214012a9cfb39dda19
This commit is contained in:
John-David Dalton
2012-07-05 13:19:45 -04:00
parent 7d4d28614a
commit 51a679d60a

View File

@@ -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);
});
}());
/*--------------------------------------------------------------------------*/