mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Add _.template unit test to ensure complex "interpolate" delimiters work.
Former-commit-id: bdfdbf00b1a1838e104919214012a9cfb39dda19
This commit is contained in:
@@ -669,6 +669,13 @@
|
|||||||
_.template('', null, options);
|
_.template('', null, options);
|
||||||
deepEqual(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);
|
||||||
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|||||||
Reference in New Issue
Block a user