Update vendors.

Former-commit-id: 88e9746e94e8ec899227b1a925bea4ab4d373fb0
This commit is contained in:
John-David Dalton
2012-08-31 12:47:55 -07:00
parent 141c10f6fe
commit 9100db55b0
13 changed files with 474 additions and 355 deletions

View File

@@ -48,6 +48,15 @@ $(document).ready(function() {
test("utility: _.escape", function() {
equal(_.escape("Curly & Moe"), "Curly & Moe");
equal(_.escape("Curly & Moe"), "Curly & Moe");
equal(_.escape(null), '');
});
test("utility: _.unescape", function() {
var string = "Curly & Moe";
equal(_.unescape("Curly & Moe"), string);
equal(_.unescape("Curly & Moe"), "Curly & Moe");
equal(_.unescape(null), '');
equal(_.unescape(_.escape(string)), string);
});
test("utility: template", function() {
@@ -156,6 +165,14 @@ $(document).ready(function() {
equal(templateWithNull({planet : "world"}), "a null undefined world", "can handle missing escape and evaluate settings");
});
test('utility: _.template provides the generated function source, when a SyntaxError occurs', function() {
try {
_.template('<b><%= if %></b>');
} catch (e) {
ok(e.source.indexOf('( if )') > 0);
}
});
test('_.template handles \\u2028 & \\u2029', function() {
var tmpl = _.template('<p>\u2028<%= "\\u2028\\u2029" %>\u2029</p>');
strictEqual(tmpl(), '<p>\u2028\u2028\u2029\u2029</p>');