// function calls it internally, it's the arguments part of the function
functionArgs:function(fn){
varargs,
l=fn.length;
// Get the text from text nodes and CDATA nodes
if(!l){
if(elem.nodeType===3||elem.nodeType===4){
return"";
ret+=elem.nodeValue;
}
// Traverse everything else, except comment nodes
args=newArray(l);
}elseif(elem.nodeType!==8){
while(l--){
ret+=getText(elem.childNodes);
// 97 is 'a'
}
args[l]=String.fromCharCode(97+l);
}
}
return""+args.join(", ")+"";
},
// object calls it internally, the key part of an item in a map
key:quote,
// function calls it internally, it's the content of the function
functionCode:"[code]",
// node calls it internally, it's an html attribute value
attribute:quote,
string:quote,
date:quote,
regexp:literal,
number:literal,
"boolean":literal
},
// if true, entities are escaped ( <, >, \t, space and \n )
HTML:false,
// indentation unit
indentChar:"",
// if true, items in a collection, are separated by a \n, else just a space.
multiline:true
};
returnret;
returnjsDump;
}
}());
//from jquery.js
//from jquery.js
functioninArray(elem,array){
functioninArray(elem,array){
if(array.indexOf){
if(array.indexOf){
returnarray.indexOf(elem);
returnarray.indexOf(elem);
...
@@ -1528,73 +2006,76 @@ function inArray( elem, array ) {
...
@@ -1528,73 +2006,76 @@ function inArray( elem, array ) {
*
*
* Usage: QUnit.diff(expected, actual)
* Usage: QUnit.diff(expected, actual)
*
*
* QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
* QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"