Commit 037d6bd5 authored by rwldrn's avatar rwldrn

4321 returns empty jquery object

parent eed3803c
...@@ -17,7 +17,8 @@ var jQuery = function( selector, context ) { ...@@ -17,7 +17,8 @@ var jQuery = function( selector, context ) {
// A simple way to check for HTML strings or ID strings // A simple way to check for HTML strings or ID strings
// (both of which we optimize for) // (both of which we optimize for)
quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/, quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
// Is it a simple selector // Is it a simple selector
isSimple = /^.[^:#\[\.,]*$/, isSimple = /^.[^:#\[\.,]*$/,
......
...@@ -12,7 +12,7 @@ test("Basic requirements", function() { ...@@ -12,7 +12,7 @@ test("Basic requirements", function() {
}); });
test("jQuery()", function() { test("jQuery()", function() {
expect(24); expect(25);
strictEqual( commonJSDefined, jQuery, "CommonJS registered (Bug #7102)" ); strictEqual( commonJSDefined, jQuery, "CommonJS registered (Bug #7102)" );
...@@ -22,6 +22,7 @@ test("jQuery()", function() { ...@@ -22,6 +22,7 @@ test("jQuery()", function() {
equals( jQuery(undefined).length, 0, "jQuery(undefined) === jQuery([])" ); equals( jQuery(undefined).length, 0, "jQuery(undefined) === jQuery([])" );
equals( jQuery(null).length, 0, "jQuery(null) === jQuery([])" ); equals( jQuery(null).length, 0, "jQuery(null) === jQuery([])" );
equals( jQuery("").length, 0, "jQuery('') === jQuery([])" ); equals( jQuery("").length, 0, "jQuery('') === jQuery([])" );
equals( jQuery("#").length, 0, "jQuery('#') === jQuery([])" );
var obj = jQuery("div") var obj = jQuery("div")
equals( jQuery(obj).selector, "div", "jQuery(jQueryObj) == jQueryObj" ); equals( jQuery(obj).selector, "div", "jQuery(jQueryObj) == jQueryObj" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment