Serialize all items, in case there are multiple

This commit is contained in:
Simon Kornblith 2012-02-20 16:26:35 -05:00
parent 833031dbdf
commit 705672d431

View file

@ -318,7 +318,12 @@ Zotero_TranslatorTester.prototype._checkResult = function(test, translate, retur
var translatedItem = Zotero_TranslatorTester._sanitizeItem(translate.newItems[i]);
if(!this._compare(testItem, translatedItem)) {
test.itemReturned = Zotero_TranslatorTester._sanitizeItem(test.items[i], true);
var m = translate.newItems.length;
test.itemsReturned = new Array(m);
for(var j=0; j<m; j++) {
test.itemsReturned[j] = Zotero_TranslatorTester._sanitizeItem(translate.newItems[i], true);
}
testDoneCallback(this, test, "unknown", "Item "+i+" does not match");
return;
}