From 86aa764f0b7b659fbd8eec9333d22c3a79bdfcd5 Mon Sep 17 00:00:00 2001 From: John Resig Date: Mon, 2 May 2011 13:14:13 -0400 Subject: Change check for skipping the initial quickExpr RegExp check. Fixes #8984. --- test/unit/core.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test/unit') diff --git a/test/unit/core.js b/test/unit/core.js index f0bf24cd5..7690756d9 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -12,7 +12,7 @@ test("Basic requirements", function() { }); test("jQuery()", function() { - expect(25); + expect(29); // Basic constructor's behavior @@ -96,6 +96,17 @@ test("jQuery()", function() { // manually clean up detached elements elem.remove(); + + equals( jQuery("
").length, 1, "Make sure whitespace is trimmed." ); + equals( jQuery(" a
b ").length, 1, "Make sure whitespace and other characters are trimmed." ); + + var long = ""; + for ( var i = 0; i < 128; i++ ) { + long += "12345678"; + } + + equals( jQuery("
" + long + "
").length, 1, "Make sure whitespace is trimmed on long strings." ); + equals( jQuery(" a
" + long + "
b ").length, 1, "Make sure whitespace and other characters are trimmed on long strings." ); }); test("selector state", function() { -- cgit v1.2.3