Skip to content

Commit

Permalink
Add integration test for #267
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Nov 18, 2022
1 parent 7957b51 commit 8c3b656
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"ccm:university" : [ "https://ror.org/0304hq317", "https://ror.org/014nnvj65" ],
"ccm:university_DISPLAYNAME" : [ "Gottfried Wilhelm Leibniz Universität Hannover", "Technische Hochschule Köln" ],
"sourceOrganization" : [ {
"id" : "https://ror.org/0304hq317",
"name" : "Gottfried Wilhelm Leibniz Universität Hannover"
}, {
"id" : "https://ror.org/014nnvj65",
"name" : "Technische Hochschule Köln"
} ]
}
{
"ccm:university" : [ "https://ror.org/02k7v4d05", "https://ror.org/04cvxnb49", "https://ror.org/024d6js02" ],
"ccm:university_DISPLAYNAME" : [ "Universität Bern", "Johann Wolfgang Goethe-Universität Frankfurt am Main", "Karls-Universität Prag" ],
"sourceOrganization" : [ {
"id" : "https://ror.org/02k7v4d05",
"name" : "Universität Bern"
}, {
"id" : "https://ror.org/04cvxnb49",
"name" : "Johann Wolfgang Goethe-Universität Frankfurt am Main"
}, {
"id" : "https://ror.org/024d6js02",
"name" : "Karls-Universität Prag"
} ]
}
{
"ccm:university" : [ "https://ror.org/04tsk2644" ],
"ccm:university_DISPLAYNAME" : [ "Ruhr-Universität Bochum" ],
"sourceOrganization" : [ {
"id" : "https://ror.org/04tsk2644",
"name" : "Ruhr-Universität Bochum"
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ccm:university" : [ "https://ror.org/0304hq317", "https://ror.org/014nnvj65" ],
"ccm:university_DISPLAYNAME" : [ "Gottfried Wilhelm Leibniz Universität Hannover", "Technische Hochschule Köln" ]
}
{
"ccm:university" : [ "https://ror.org/02k7v4d05", "https://ror.org/04cvxnb49", "https://ror.org/024d6js02" ],
"ccm:university_DISPLAYNAME" : [ "Universität Bern", "Johann Wolfgang Goethe-Universität Frankfurt am Main", "Karls-Universität Prag" ]
}
{
"ccm:university" : [ "https://ror.org/04tsk2644" ],
"ccm:university_DISPLAYNAME" : [ "Ruhr-Universität Bochum" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set_array("sourceOrganization[]")
do list_as(orgId: "ccm:university[]", orgName: "ccm:university_DISPLAYNAME[]")
copy_field(orgId, "sourceOrganization[].$append.id")
copy_field(orgName, "sourceOrganization[].$last.name")
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FLUX_DIR + "input.json"
|open-file
|as-records
|decode-json
|fix(FLUX_DIR + "test.fix")
|encode-json(prettyPrinting="true")
|write(FLUX_DIR + "output-metafix.json")
;

0 comments on commit 8c3b656

Please sign in to comment.