aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/core.js
diff options
context:
space:
mode:
authorLeonardo Braga <leonardo.braga@gmail.com>2015-01-04 17:48:35 -0500
committerOleg Gaidarenko <markelog@gmail.com>2015-01-13 07:42:52 +0300
commit534f13025aeb59a7d5893ce62efafa0b066a4934 (patch)
treea27b9d3358052ccdc273921c9d9ee74a6bd37a9f /test/unit/core.js
parenta4133ffafa6ac43b3aa22bc4edb4444b09f5250c (diff)
downloadjquery-534f13025aeb59a7d5893ce62efafa0b066a4934.tar.gz
jquery-534f13025aeb59a7d5893ce62efafa0b066a4934.zip
Core: add support to tag-hyphenated elements
Ref #1987
Diffstat (limited to 'test/unit/core.js')
-rw-r--r--test/unit/core.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index 1852a427a..eb05130c5 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -594,6 +594,19 @@ test("jQuery('html')", function() {
equal( jQuery( "\\<div\\>" ).length, 0, "Ignore escaped html characters" );
});
+test("jQuery(tag-hyphenated elements) gh-1987", function() {
+ expect( 17 );
+
+ jQuery.each( "thead tbody tfoot colgroup caption tr th td".split(" "), function( i, name ) {
+ var j = jQuery("<" + name + "-d></" + name + "-d>");
+ ok( j[0], "Create a tag-hyphenated elements" );
+ ok( jQuery.nodeName(j[0], name.toUpperCase() + "-D"), "Tag-hyphenated element has expected node name" );
+ });
+
+ var j = jQuery("<tr-multiple-hyphens></tr-multiple-hyphens>");
+ ok( jQuery.nodeName(j[0], "TR-MULTIPLE-HYPHENS"), "Element with multiple hyphens in its tag has expected node name" );
+});
+
test("jQuery('massive html #7990')", function() {
expect( 3 );