Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for non-CSL collection-title-short variable
- Loading branch information
Showing
2 changed files
with
254 additions
and
0 deletions.
There are no files selected for viewing
128 changes: 128 additions & 0 deletions
128
tests/fixtures/local/variables_CollectionTitleShort.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
>>===== MODE =====>> | ||
bibliography | ||
<<===== MODE =====<< | ||
|
||
|
||
Test for https://github.com/Juris-M/citeproc-js/issues/96 | ||
|
||
|
||
>>===== RESULT =====>> | ||
<div class="csl-bib-body"> | ||
<div class="csl-entry">Series: a title</div> | ||
<div class="csl-entry">Series</div> | ||
</div> | ||
<<===== RESULT =====<< | ||
|
||
|
||
>>===== CITATIONS =====>> | ||
[ | ||
[ | ||
{ | ||
"citationID": "CITATION-1", | ||
"citationItems": [ | ||
{ | ||
"id": "ITEM-1" | ||
}, | ||
{ | ||
"id": "ITEM-2" | ||
} | ||
], | ||
"properties": { | ||
"noteIndex": 1 | ||
} | ||
}, | ||
[], | ||
[] | ||
] | ||
] | ||
<<===== CITATIONS =====<< | ||
|
||
|
||
>>===== CSL =====>> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" page-range-format="minimal"> | ||
<info> | ||
<title>Vancouver</title> | ||
<id>http://www.zotero.org/styles/vancouver</id> | ||
<link href="http://www.zotero.org/styles/vancouver" rel="self"/> | ||
<link href="http://www.nlm.nih.gov/bsd/uniform_requirements.html" rel="documentation"/> | ||
<author> | ||
<name>Michael Berkowitz</name> | ||
<email>mberkowi@gmu.edu</email> | ||
</author> | ||
<contributor> | ||
<name>Sean Takats</name> | ||
<email>stakats@gmu.edu</email> | ||
</contributor> | ||
<contributor> | ||
<name>Sebastian Karcher</name> | ||
</contributor> | ||
<category citation-format="numeric"/> | ||
<category field="medicine"/> | ||
<summary>Vancouver style as outlined by International Committee of Medical Journal Editors Uniform Requirements for Manuscripts Submitted to Biomedical Journals: Sample References</summary> | ||
<updated>2014-09-06T16:03:01+00:00</updated> | ||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> | ||
</info> | ||
<citation> | ||
<layout> | ||
<text value="BOGUS"/> | ||
</layout> | ||
</citation> | ||
<bibliography> | ||
<layout> | ||
<choose> | ||
<if type="chapter"> | ||
<text variable="collection-title"/> | ||
</if> | ||
<else-if type="article-journal"> | ||
<text variable="collection-title" form="short"/> | ||
</else-if> | ||
</choose> | ||
</layout> | ||
</bibliography> | ||
</style> | ||
<<===== CSL =====<< | ||
|
||
|
||
>>===== INPUT =====>> | ||
[ | ||
{ | ||
"id": "ITEM-1", | ||
"type": "chapter", | ||
"title": "Main title", | ||
"source": "Zotero", | ||
"collection-title": "Series: a title", | ||
"collection-title-short": "Series", | ||
"language": "en", | ||
"author": [ | ||
{ | ||
"family": "Campbell", | ||
"given": "Donald T" | ||
}, | ||
{ | ||
"family": "Fiske", | ||
"given": "Donald W" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "ITEM-2", | ||
"type": "article-journal", | ||
"title": "Main title", | ||
"source": "Zotero", | ||
"collection-title": "Series: a title", | ||
"collection-title-short": "Series", | ||
"language": "en", | ||
"author": [ | ||
{ | ||
"family": "Campbell", | ||
"given": "Donald T" | ||
}, | ||
{ | ||
"family": "Fiske", | ||
"given": "Donald W" | ||
} | ||
] | ||
} | ||
] | ||
<<===== INPUT =====<< |
126 changes: 126 additions & 0 deletions
126
tests/fixtures/local/variables_CollectionTitleShort2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
>>===== MODE =====>> | ||
bibliography | ||
<<===== MODE =====<< | ||
|
||
Test for https://github.com/Juris-M/citeproc-js/issues/96 | ||
|
||
>>===== RESULT =====>> | ||
<div class="csl-bib-body"> | ||
<div class="csl-entry">Series: a title</div> | ||
<div class="csl-entry">Series</div> | ||
</div> | ||
<<===== RESULT =====<< | ||
|
||
|
||
>>===== CITATIONS =====>> | ||
[ | ||
[ | ||
{ | ||
"citationID": "CITATION-1", | ||
"citationItems": [ | ||
{ | ||
"id": "ITEM-1" | ||
}, | ||
{ | ||
"id": "ITEM-2" | ||
} | ||
], | ||
"properties": { | ||
"noteIndex": 1 | ||
} | ||
}, | ||
[], | ||
[] | ||
] | ||
] | ||
<<===== CITATIONS =====<< | ||
|
||
|
||
>>===== CSL =====>> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" page-range-format="minimal"> | ||
<info> | ||
<title>Vancouver</title> | ||
<id>http://www.zotero.org/styles/vancouver</id> | ||
<link href="http://www.zotero.org/styles/vancouver" rel="self"/> | ||
<link href="http://www.nlm.nih.gov/bsd/uniform_requirements.html" rel="documentation"/> | ||
<author> | ||
<name>Michael Berkowitz</name> | ||
<email>mberkowi@gmu.edu</email> | ||
</author> | ||
<contributor> | ||
<name>Sean Takats</name> | ||
<email>stakats@gmu.edu</email> | ||
</contributor> | ||
<contributor> | ||
<name>Sebastian Karcher</name> | ||
</contributor> | ||
<category citation-format="numeric"/> | ||
<category field="medicine"/> | ||
<summary>Vancouver style as outlined by International Committee of Medical Journal Editors Uniform Requirements for Manuscripts Submitted to Biomedical Journals: Sample References</summary> | ||
<updated>2014-09-06T16:03:01+00:00</updated> | ||
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> | ||
</info> | ||
<citation> | ||
<layout> | ||
<text value="BOGUS"/> | ||
</layout> | ||
</citation> | ||
<bibliography> | ||
<layout> | ||
<choose> | ||
<if type="chapter"> | ||
<text variable="collection-title"/> | ||
</if> | ||
<else-if type="article-journal"> | ||
<text variable="collection-title" form="short"/> | ||
</else-if> | ||
</choose> | ||
</layout> | ||
</bibliography> | ||
</style> | ||
<<===== CSL =====<< | ||
|
||
|
||
>>===== INPUT =====>> | ||
[ | ||
{ | ||
"id": "ITEM-1", | ||
"type": "chapter", | ||
"title": "CONVERGENT AND DISCRIMINANT VALIDATION BY THE MULTITRAIT-MULTIMETHOD MATRIX", | ||
"page": "25", | ||
"source": "Zotero", | ||
"note": "collection-title: Series: a title\ncollection-title-short: Series\ncollection-title: Container: a title\ncollection-title-short: Container", | ||
"language": "en", | ||
"author": [ | ||
{ | ||
"family": "Campbell", | ||
"given": "Donald T" | ||
}, | ||
{ | ||
"family": "Fiske", | ||
"given": "Donald W" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "ITEM-2", | ||
"type": "article-journal", | ||
"title": "CONVERGENT AND DISCRIMINANT VALIDATION BY THE MULTITRAIT-MULTIMETHOD MATRIX", | ||
"page": "25", | ||
"source": "Zotero", | ||
"note": "collection-title: Series: a title\ncollection-title-short: Series\ncollection-title: Container: a title\ncollection-title-short: Container", | ||
"language": "en", | ||
"author": [ | ||
{ | ||
"family": "Campbell", | ||
"given": "Donald T" | ||
}, | ||
{ | ||
"family": "Fiske", | ||
"given": "Donald W" | ||
} | ||
] | ||
} | ||
] | ||
<<===== INPUT =====<< |