Skip to content

Commit 8c3b656

Browse files
committed
Add integration test for #267
1 parent 7957b51 commit 8c3b656

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"ccm:university" : [ "https://ror.org/0304hq317", "https://ror.org/014nnvj65" ],
3+
"ccm:university_DISPLAYNAME" : [ "Gottfried Wilhelm Leibniz Universität Hannover", "Technische Hochschule Köln" ],
4+
"sourceOrganization" : [ {
5+
"id" : "https://ror.org/0304hq317",
6+
"name" : "Gottfried Wilhelm Leibniz Universität Hannover"
7+
}, {
8+
"id" : "https://ror.org/014nnvj65",
9+
"name" : "Technische Hochschule Köln"
10+
} ]
11+
}
12+
{
13+
"ccm:university" : [ "https://ror.org/02k7v4d05", "https://ror.org/04cvxnb49", "https://ror.org/024d6js02" ],
14+
"ccm:university_DISPLAYNAME" : [ "Universität Bern", "Johann Wolfgang Goethe-Universität Frankfurt am Main", "Karls-Universität Prag" ],
15+
"sourceOrganization" : [ {
16+
"id" : "https://ror.org/02k7v4d05",
17+
"name" : "Universität Bern"
18+
}, {
19+
"id" : "https://ror.org/04cvxnb49",
20+
"name" : "Johann Wolfgang Goethe-Universität Frankfurt am Main"
21+
}, {
22+
"id" : "https://ror.org/024d6js02",
23+
"name" : "Karls-Universität Prag"
24+
} ]
25+
}
26+
{
27+
"ccm:university" : [ "https://ror.org/04tsk2644" ],
28+
"ccm:university_DISPLAYNAME" : [ "Ruhr-Universität Bochum" ],
29+
"sourceOrganization" : [ {
30+
"id" : "https://ror.org/04tsk2644",
31+
"name" : "Ruhr-Universität Bochum"
32+
} ]
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"ccm:university" : [ "https://ror.org/0304hq317", "https://ror.org/014nnvj65" ],
3+
"ccm:university_DISPLAYNAME" : [ "Gottfried Wilhelm Leibniz Universität Hannover", "Technische Hochschule Köln" ]
4+
}
5+
{
6+
"ccm:university" : [ "https://ror.org/02k7v4d05", "https://ror.org/04cvxnb49", "https://ror.org/024d6js02" ],
7+
"ccm:university_DISPLAYNAME" : [ "Universität Bern", "Johann Wolfgang Goethe-Universität Frankfurt am Main", "Karls-Universität Prag" ]
8+
}
9+
{
10+
"ccm:university" : [ "https://ror.org/04tsk2644" ],
11+
"ccm:university_DISPLAYNAME" : [ "Ruhr-Universität Bochum" ]
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set_array("sourceOrganization[]")
2+
do list_as(orgId: "ccm:university[]", orgName: "ccm:university_DISPLAYNAME[]")
3+
copy_field(orgId, "sourceOrganization[].$append.id")
4+
copy_field(orgName, "sourceOrganization[].$last.name")
5+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FLUX_DIR + "input.json"
2+
|open-file
3+
|as-records
4+
|decode-json
5+
|fix(FLUX_DIR + "test.fix")
6+
|encode-json(prettyPrinting="true")
7+
|write(FLUX_DIR + "output-metafix.json")
8+
;

0 commit comments

Comments
 (0)