X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=312bc3ce15b6aa8e8bf668c7d85e363f2334262e;hb=fc3e180465a88558321b6550ac4692d7cc4b281f;hp=289a41610e9423e85dad837a59264eaf60e4433c;hpb=2ef4093cf7f52383dd43bd361864edcda27e5c3c;p=jquery.git diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 289a416..312bc3c 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -680,7 +680,7 @@ test("$.extend(Object, Object)", function() { isObj( settings, merged, "Check if extended: settings must be extended" ); isObj( options, optionsCopy, "Check if not modified: options must not be modified" ); - jQuery.extend(deep1, deep2); + jQuery.extend(true, deep1, deep2); isObj( deep1.foo, deepmerged.foo, "Check if foo: settings must be extended" ); isObj( deep2.foo, deep2copy.foo, "Check if not deep2: options must not be modified" ); @@ -920,3 +920,11 @@ test("eq(), gt(), lt(), contains()", function() { isSet( $("#ap a").lt(3).get(), q("google", "groups", "anchor1"), "lt()" ); isSet( $("#foo a").contains("log").get(), q("anchor2", "simon"), "contains()" ); }); + +test("slice()", function() { + expect(4); + isSet( $("#ap a").slice(1,2), q("groups"), "slice(1,2)" ); + isSet( $("#ap a").slice(1), q("groups", "anchor1", "mark"), "slice(1)" ); + isSet( $("#ap a").slice(0,3), q("google", "groups", "anchor1"), "slice(0,3)" ); + isSet( $("#ap a").slice(-1), q("mark"), "slice(-1)" ); +});