10 |
11 | Doe Co.
12 | Doe Co.
13 | Doe Co.
14 | Doe Co.
15 | Doe Co.
16 | Doe Co.
17 |
18 |
19 | <<===== RESULT =====<<
20 |
21 |
22 | >>===== CSL =====>>
23 |
24 |
62 | <<===== CSL =====<<
63 |
64 |
65 | >>===== INPUT =====>>
66 | [
67 | {
68 | "author": [
69 | {
70 | "family": "Doe Co.",
71 | "isInstitution": true
72 | }
73 | ],
74 | "id": "ITEM-1",
75 | "issued": {
76 | "date-parts": [
77 | [
78 | "1965",
79 | "6",
80 | "1"
81 | ]
82 | ]
83 | },
84 | "title": "His Collectively Anonymous Life",
85 | "type": "book"
86 | }
87 | ]
88 | <<===== INPUT =====<<
89 |
90 |
91 | >>===== VERSION =====>>
92 | 1.0
93 | <<===== VERSION =====<<
94 |
--------------------------------------------------------------------------------
/tests/local/date_NegativeDateSort.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | Sort position of empty dates differs in citations and bibliographies.
7 | In citations, empty dates have a value equivalent to zero. In
8 | bibliographies, they are always placed at the end of the sort
9 | (whether ascending or descending).
10 |
11 | >>===== RESULT =====>>
12 | 101 BC-7-13, 45 BC-3-15, 54 AD-10-13, 68 AD-6-11
13 | <<===== RESULT =====<<
14 |
15 |
16 | >>===== CSL =====>>
17 |
39 | <<===== CSL =====<<
40 |
41 |
42 | >>===== INPUT =====>>
43 | [
44 | {
45 | "id": "ITEM-1",
46 | "issued": {
47 | "date-parts": [
48 | [
49 | -100,
50 | 7,
51 | 13
52 | ]
53 | ]
54 | },
55 | "title": "BookA",
56 | "type": "book"
57 | },
58 | {
59 | "id": "ITEM-2",
60 | "issued": {
61 | "date-parts": [
62 | [
63 | 54,
64 | 10,
65 | 13
66 | ]
67 | ]
68 | },
69 | "title": "BookB",
70 | "type": "book"
71 | },
72 | {
73 | "id": "ITEM-3",
74 | "issued": {
75 | "date-parts": [
76 | [
77 | -44,
78 | 3,
79 | 15
80 | ]
81 | ]
82 | },
83 | "title": "BookC",
84 | "type": "book"
85 | },
86 | {
87 | "id": "ITEM-4",
88 | "issued": {
89 | "date-parts": [
90 | [
91 | 68,
92 | 6,
93 | 11
94 | ]
95 | ]
96 | },
97 | "title": "BookD",
98 | "type": "book"
99 | }
100 | ]
101 | <<===== INPUT =====<<
102 |
103 |
104 | >>===== VERSION =====>>
105 | 1.0
106 | <<===== VERSION =====<<
--------------------------------------------------------------------------------
/tests/local/date_NegativeDateSortViaMacro.txt:
--------------------------------------------------------------------------------
1 | >>===== MODE =====>>
2 | citation
3 | <<===== MODE =====<<
4 |
5 |
6 | Sort position of empty dates differs in citations and bibliographies.
7 | In citations, empty dates have a value equivalent to zero. In
8 | bibliographies, they are always placed at the end of the sort
9 | (whether ascending or descending).
10 |
11 | >>===== RESULT =====>>
12 | 101 BC-7-13, 45 BC-3-15, 54 AD-10-13, 68 AD-6-11
13 | <<===== RESULT =====<<
14 |
15 |
16 | >>===== CSL =====>>
17 |
42 | <<===== CSL =====<<
43 |
44 |
45 | >>===== INPUT =====>>
46 | [
47 | {
48 | "id": "ITEM-1",
49 | "issued": {
50 | "date-parts": [
51 | [
52 | -100,
53 | 7,
54 | 13
55 | ]
56 | ]
57 | },
58 | "title": "BookA",
59 | "type": "book"
60 | },
61 | {
62 | "id": "ITEM-2",
63 | "issued": {
64 | "date-parts": [
65 | [
66 | 54,
67 | 10,
68 | 13
69 | ]
70 | ]
71 | },
72 | "title": "BookB",
73 | "type": "book"
74 | },
75 | {
76 | "id": "ITEM-3",
77 | "issued": {
78 | "date-parts": [
79 | [
80 | -44,
81 | 3,
82 | 15
83 | ]
84 | ]
85 | },
86 | "title": "BookC",
87 | "type": "book"
88 | },
89 | {
90 | "id": "ITEM-4",
91 | "issued": {
92 | "date-parts": [
93 | [
94 | 68,
95 | 6,
96 | 11
97 | ]
98 | ]
99 | },
100 | "title": "BookD",
101 | "type": "book"
102 | }
103 | ]
104 | <<===== INPUT =====<<
105 |
106 |
107 | >>===== VERSION =====>>
108 | 1.0
109 | <<===== VERSION =====<<
--------------------------------------------------------------------------------
/tests/common/mod.rs:
--------------------------------------------------------------------------------
1 | use std::{fs, io, path::PathBuf, process::Command};
2 |
3 | pub const CACHE_PATH: &str = "target/haya-cache";
4 |
5 | #[allow(unused)]
6 | pub fn iter_files<'a>(
7 | path: &'a PathBuf,
8 | extension: &'a str,
9 | ) -> impl Iterator