From ea6a1e9be90d078cba6cbfa0be8b5a0d462ac27c Mon Sep 17 00:00:00 2001 From: Frank Bennett Date: Sat, 19 Jan 2019 14:19:26 +0900 Subject: [PATCH] Add tests for non-CSL collection-title-short variable --- .../local/variables_CollectionTitleShort.txt | 128 ++++++++++++++++++ .../local/variables_CollectionTitleShort2.txt | 126 +++++++++++++++++ 2 files changed, 254 insertions(+) create mode 100644 tests/fixtures/local/variables_CollectionTitleShort.txt create mode 100644 tests/fixtures/local/variables_CollectionTitleShort2.txt diff --git a/tests/fixtures/local/variables_CollectionTitleShort.txt b/tests/fixtures/local/variables_CollectionTitleShort.txt new file mode 100644 index 000000000..c8d7f72b2 --- /dev/null +++ b/tests/fixtures/local/variables_CollectionTitleShort.txt @@ -0,0 +1,128 @@ +>>===== MODE =====>> +bibliography +<<===== MODE =====<< + + +Test for https://github.com/Juris-M/citeproc-js/issues/96 + + +>>===== RESULT =====>> +
+
Series: a title
+
Series
+
+<<===== RESULT =====<< + + +>>===== CITATIONS =====>> +[ + [ + { + "citationID": "CITATION-1", + "citationItems": [ + { + "id": "ITEM-1" + }, + { + "id": "ITEM-2" + } + ], + "properties": { + "noteIndex": 1 + } + }, + [], + [] + ] +] +<<===== CITATIONS =====<< + + +>>===== CSL =====>> + + +<<===== 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 =====<< diff --git a/tests/fixtures/local/variables_CollectionTitleShort2.txt b/tests/fixtures/local/variables_CollectionTitleShort2.txt new file mode 100644 index 000000000..f0a47c381 --- /dev/null +++ b/tests/fixtures/local/variables_CollectionTitleShort2.txt @@ -0,0 +1,126 @@ +>>===== MODE =====>> +bibliography +<<===== MODE =====<< + +Test for https://github.com/Juris-M/citeproc-js/issues/96 + +>>===== RESULT =====>> +
+
Series: a title
+
Series
+
+<<===== RESULT =====<< + + +>>===== CITATIONS =====>> +[ + [ + { + "citationID": "CITATION-1", + "citationItems": [ + { + "id": "ITEM-1" + }, + { + "id": "ITEM-2" + } + ], + "properties": { + "noteIndex": 1 + } + }, + [], + [] + ] +] +<<===== CITATIONS =====<< + + +>>===== CSL =====>> + + +<<===== 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 =====<<