rem: test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() { expect(18); var defaultText = 'Try them out:' var result = $('#first').append('<b>buga</b>'); ok( result.text() == defaultText + 'buga', 'Check if text appending works' ); ok( $('#select3').append('<option value="appendTest">Append Test</option>').find('option:last-child').attr('value') == 'appendTest', 'Appending html options to select element');  reset(); var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:"; $('#sap').append(document.getElementById('first')); ok( expected == $('#sap').text(), "Check for appending of element" );  reset(); expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo"; $('#sap').append([document.getElementById('first'), document.getElementById('yahoo')]); ok( expected == $('#sap').text(), "Check for appending of array of elements" );  reset(); expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo"; $('#sap').append($("#first, #yahoo")); ok( expected == $('#sap').text(), "Check for appending of jQuery object" ); 
add: test("wrapAll(String|Element)", function() { expect(8); var prev = $("#first")[0].previousSibling; var p = $("#first")[0].parentNode; var result = $('#first,#firstp').wrapAll('<div class="red"><div id="tmp"></div></div>'); equals( result.parent().length, 1, 'Check for wrapping of on-the-fly html' ); ok( $('#first').parent().parent().is('.red'), 'Check if wrapper has class "red"' ); ok( $('#firstp').parent().parent().is('.red'), 'Check if wrapper has class "red"' ); equals( $("#first").parent().parent()[0].previousSibling, prev, "Correct Previous Sibling" ); equals( $("#first").parent().parent()[0].parentNode, p, "Correct Parent" ); 
context: test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {	expect(18);	var defaultText = 'Try them out:'	var result = $('#first').append('<b>buga</b>');	ok( result.text() == defaultText + 'buga', 'Check if text appending works' );	ok( $('#select3').append('<option value="appendTest">Append Test</option>').find('option:last-child').attr('value') == 'appendTest', 'Appending html options to select element');		reset();	var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";	$('#sap').append(document.getElementById('first'));	ok( expected == $('#sap').text(), "Check for appending of element" );		reset();	expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";	$('#sap').append([document.getElementById('first'), document.getElementById('yahoo')]);	ok( expected == $('#sap').text(), "Check for appending of array of elements" );		reset();	expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:Yahoo";	$('#sap').append($("#first, #yahoo"));	ok( expected == $('#sap').text(), "Check for appending of jQuery object" );	reset();	$("#sap").append( 5 );	ok( $("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" );	reset();	$("#sap").append( " text with spaces " );	ok( $("#sap")[0].innerHTML.match(/ text with spaces $/), "Check for appending text with spaces" );	reset();	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" );  // Bug #910	reset();	var pass = true;	try {		$( $("iframe")[0].contentWindow.document.body ).append("<div>test</div>");	} catch(e) {		pass = false;	}	ok( pass, "Test for appending a DOM node to the contents of an IFrame" );		reset();	$('<fieldset/>').appendTo('#form').append('<legend id="legend">test</legend>');	t( 'Append legend', '#legend', ['legend'] );		reset();	$('#select1').append('<OPTION>Test</OPTION>');	ok( $('#select1 option:last').text() == "Test", "Appending &lt;OPTION&gt; (all caps)" );		$('#table').append('<colgroup></colgroup>');	ok( $('#table colgroup').length, "Append colgroup" );		$('#table colgroup').append('<col/>');	ok( $('#table colgroup col').length, "Append col" );		reset();	$('#table').append('<caption></caption>');	ok( $('#table caption').length, "Append caption" );	reset();	$('form:last')		.append('<select id="appendSelect1"></select>')		.append('<select id="appendSelect2"><option>Test</option></select>');		t( "Append Select", "#appendSelect1, #appendSelect2", ["appendSelect1", "appendSelect2"] );});
meta: 3217	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3217/e3263063e4ef3d2e0ee6b74b9da573bf40e87668/coreTest.js/buggy/src/jquery/coreTest.js