aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-05-02 13:14:13 -0400
committerJohn Resig <jeresig@gmail.com>2011-05-02 13:14:13 -0400
commit86aa764f0b7b659fbd8eec9333d22c3a79bdfcd5 (patch)
tree8aa650ad330250e7cb6a7bd2176da14188626d63 /test/unit
parentf1392d82089323ec9ef97b33909b960cc16c25b6 (diff)
downloadjquery-86aa764f0b7b659fbd8eec9333d22c3a79bdfcd5.tar.gz
jquery-86aa764f0b7b659fbd8eec9333d22c3a79bdfcd5.zip
Change check for skipping the initial quickExpr RegExp check. Fixes #8984.
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/core.js13
1 files changed, 12 insertions, 1 deletions
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(" <div/> ").length, 1, "Make sure whitespace is trimmed." );
+ equals( jQuery(" a<div/>b ").length, 1, "Make sure whitespace and other characters are trimmed." );
+
+ var long = "";
+ for ( var i = 0; i < 128; i++ ) {
+ long += "12345678";
+ }
+
+ equals( jQuery(" <div>" + long + "</div> ").length, 1, "Make sure whitespace is trimmed on long strings." );
+ equals( jQuery(" a<div>" + long + "</div>b ").length, 1, "Make sure whitespace and other characters are trimmed on long strings." );
});
test("selector state", function() {