diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2013-05-13 21:55:00 -0400 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-05-13 21:55:00 -0400 |
commit | d8a35011ec05ed3493a85c1bd699902893cd437c (patch) | |
tree | c6ac361bb47a09b9f7fe15cd2a672c8bf8b3e908 /test | |
parent | d80c6aca18240281f553a35d727c2891d4bc2b57 (diff) | |
download | jquery-d8a35011ec05ed3493a85c1bd699902893cd437c.tar.gz jquery-d8a35011ec05ed3493a85c1bd699902893cd437c.zip |
Fix #13835: classes separated by form feed
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/attributes.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js index 062dd504c..84ac8c2b2 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -1353,6 +1353,26 @@ test( "contents().hasClass() returns correct values", function() { ok( !$contents.hasClass("undefined"), "Did not find 'undefined' in $contents (correctly)" ); }); +test( "hasClass correctly interprets non-space separators (#13835)", function() { + expect( 4 ); + + var + map = { + tab: "	", + "line-feed": " ", + "form-feed": "", + "carriage-return": " " + }, + classes = jQuery.map( map, function( separator, label ) { + return " " + separator + label + separator + " "; + }), + $div = jQuery( "<div class='" + classes + "'></div>" ); + + jQuery.each( map, function( label ) { + ok( $div.hasClass( label ), label.replace( "-", " " ) ); + }); +}); + test( "coords returns correct values in IE6/IE7, see #10828", function() { expect( 1 ); |