git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for #1167
[jquery.git]
/
src
/
jquery
/
coreTest.js
diff --git
a/src/jquery/coreTest.js
b/src/jquery/coreTest.js
index
479bed0
..
dc9c8ed
100644
(file)
--- a/
src/jquery/coreTest.js
+++ b/
src/jquery/coreTest.js
@@
-356,7
+356,7
@@
test("wrap(String|Element)", function() {
});
test("append(String|Element|Array<Element>|jQuery)", function() {
});
test("append(String|Element|Array<Element>|jQuery)", function() {
- expect(14);
+ expect(16);
var defaultText = 'Try them out:'
var result = $('#first').append('<b>buga</b>');
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );
var defaultText = 'Try them out:'
var result = $('#first').append('<b>buga</b>');
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );
@@
-412,6
+412,11
@@
test("append(String|Element|Array<Element>|jQuery)", function() {
$('#select1').append('<OPTION>Test</OPTION>');
ok( $('#select1 option:last').text() == "Test", "Appending <OPTION> (all caps)" );
$('#select1').append('<OPTION>Test</OPTION>');
ok( $('#select1 option:last').text() == "Test", "Appending <OPTION> (all caps)" );
+ $('#table').append('<colgroup></colgroup>');
+ ok( $('#table colgroup').length, "Append colgroup" );
+
+ $('#table colgroup').append('<col>');
+ ok( $('#table colgroup col').length, "Append col" );
});
test("appendTo(String|Element|Array<Element>|jQuery)", function() {
});
test("appendTo(String|Element|Array<Element>|jQuery)", function() {
@@
-761,7
+766,7
@@
test("addClass(String)", function() {
});
test("removeClass(String) - simple", function() {
});
test("removeClass(String) - simple", function() {
- expect(2);
+ expect(3);
var div = $("div").addClass("test").removeClass("test"),
pass = true;
for ( var i = 0; i < div.size(); i++ ) {
var div = $("div").addClass("test").removeClass("test"),
pass = true;
for ( var i = 0; i < div.size(); i++ ) {
@@
-777,6
+782,11
@@
test("removeClass(String) - simple", function() {
if ( div.get(i).className.match(/test|bar|foo/) ) pass = false;
}
ok( pass, "Remove multiple classes" );
if ( div.get(i).className.match(/test|bar|foo/) ) pass = false;
}
ok( pass, "Remove multiple classes" );
+
+ reset();
+ var div = $("div:eq(0)").addClass("test").removeClass("");
+ ok( div.is('.test'), "Empty string passed to removeClass" );
+
});
test("toggleClass(String)", function() {
});
test("toggleClass(String)", function() {