Selector state wasn't being passed along on a cloned jQuery object.
[jquery.git] / test / unit / core.js
index ee5f805..98a161f 100644 (file)
@@ -53,7 +53,7 @@ test("jQuery()", function() {
 });
 
 test("selector state", function() {
-       expect(26);
+       expect(28);
 
        var test;
        
@@ -80,6 +80,11 @@ test("selector state", function() {
        test = jQuery("#main", document.body);
        equals( test.selector, "#main", "#main Selector" );
        equals( test.context, document.body, "#main Context" );
+
+       // Test cloning
+       test = jQuery(test);
+       equals( test.selector, "#main", "#main Selector" );
+       equals( test.context, document.body, "#main Context" );
        
        test = jQuery(document.body).find("#main");
        equals( test.selector, "#main", "#main find Selector" );