commit f6ed98f255c9b8c52e25378fed22cf3095764f7f
parent da9ecd0a981c44e7420173bd73cd50b4e56c38d6
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 23 Jun 2011 09:31:34 +0000
Also add tests to DOI translator
Diffstat:
1 file changed, 45 insertions(+), 14 deletions(-)
diff --git a/translators/DOI.js b/translators/DOI.js
@@ -1,17 +1,3 @@
-{
- "translatorID":"c159dcfe-8a53-4301-a499-30f6549c340d",
- "translatorType":4,
- "label":"DOI",
- "creator":"Simon Kornblith",
- "target":null,
- "minVersion":"1.0.10",
- "maxVersion":"",
- "priority":300,
- "browserSupport":"gcs",
- "inRepository":true,
- "lastUpdated":"2011-06-23 08:58:22"
-}
-
var items = {};
var selectArray = {};
@@ -109,3 +95,47 @@ function doWeb(doc, url) {
Zotero.wait();
retrieveNextDOI(DOIs, doc);
}
+
+
+/** BEGIN TEST CASES **/
+var testCases = [
+ {
+ "type": "web",
+ "url": "http://www.crossref.org/help/Content/01_About_DOIs/What_is_a_DOI.htm",
+ "items": [
+ {
+ "itemType": "journalArticle",
+ "creators": [
+ {
+ "creatorType": "author",
+ "firstName": "J",
+ "lastName": "Mou"
+ }
+ ],
+ "notes": [],
+ "tags": [],
+ "seeAlso": [],
+ "attachments": [
+ {
+ "document": false
+ }
+ ],
+ "publicationTitle": "Journal of Molecular Biology",
+ "volume": "248",
+ "ISSN": "00222836",
+ "date": "1995-5-5",
+ "pages": "507-512",
+ "DOI": "10.1006/jmbi.1995.0238",
+ "url": "http://www.crossref.org/help/Content/01_About_DOIs/What_is_a_DOI.htm",
+ "title": "Atomic Force Microscopy of Cholera Toxin B-oligomers Bound to Bilayers of Biologically Relevant Lipids",
+ "libraryCatalog": "CrossRef"
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "http://blog.apastyle.org/apastyle/digital-object-identifier-doi/",
+ "items": "multiple"
+ }
+]
+/** END TEST CASES **/
+\ No newline at end of file