});
test("data-* attributes", function() {
- expect(20);
+ expect(22);
var div = jQuery("<div>"),
child = jQuery("<div data-myobj='old data' data-ignored=\"DOM\"></div>");
.attr("data-false", "false")
.attr("data-five", "5")
.attr("data-point", "5.5")
+ .attr("data-pointbad", "5..5")
+ .attr("data-pointbad2", "-.")
.attr("data-null", "null")
.attr("data-string", "test");
equals( child.data('false'), false, "Primitive false read from attribute");
equals( child.data('five'), 5, "Primitive number read from attribute");
equals( child.data('point'), 5.5, "Primitive number read from attribute");
+ equals( child.data('pointbad'), "5..5", "Bad number read from attribute");
+ equals( child.data('pointbad2'), "-.", "Bad number read from attribute");
equals( child.data('null'), null, "Primitive null read from attribute");
equals( child.data('string'), "test", "Typical string read from attribute");