Side navigation
Ticket #910: new_test.diff
File new_test.diff, 1.1 KB (added by Renato, February 03, 2007 12:42PM UTC)
a test for the bug
Index: coreTest.js
===================================================================
--- coreTest.js (revisione 1258)
+++ coreTest.js (copia locale)
@@ -204,7 +204,7 @@
});
test("append(String|Element|Array<Element>|jQuery)", function() {
- expect(9);
+ expect(10);
var defaultText = 'Try them out:'
var result = $('#first').append('<b>buga</b>');
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );
@@ -233,6 +233,10 @@
ok( $("#sap").append([]), "Check for appending an empty array." );
ok( $("#sap").append(""), "Check for appending an empty string." );
ok( $("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." );
+
+ reset();
+ $("#sap").append(document.getElementById('form'));
+ ok( $("#sap>form").size() == 1, "Check for appending a form" )
});
test("appendTo(String|Element|Array<Element>|jQuery)", function() {
@@ -678,4 +682,4 @@
//console.log( close[0]); // it's the <a> and not a <span> element
return false;
}).click();
-});
\ Nessun a-capo alla fine del file
+});
Download in other formats:
Original Format
File new_test.diff, 1.1 KB (added by Renato, February 03, 2007 12:42PM UTC)
a test for the bug
Index: coreTest.js
===================================================================
--- coreTest.js (revisione 1258)
+++ coreTest.js (copia locale)
@@ -204,7 +204,7 @@
});
test("append(String|Element|Array<Element>|jQuery)", function() {
- expect(9);
+ expect(10);
var defaultText = 'Try them out:'
var result = $('#first').append('<b>buga</b>');
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );
@@ -233,6 +233,10 @@
ok( $("#sap").append([]), "Check for appending an empty array." );
ok( $("#sap").append(""), "Check for appending an empty string." );
ok( $("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." );
+
+ reset();
+ $("#sap").append(document.getElementById('form'));
+ ok( $("#sap>form").size() == 1, "Check for appending a form" )
});
test("appendTo(String|Element|Array<Element>|jQuery)", function() {
@@ -678,4 +682,4 @@
//console.log( close[0]); // it's the <a> and not a <span> element
return false;
}).click();
-});
\ Nessun a-capo alla fine del file
+});