Skip to content

Commit 55f2ba8

Browse files
committed
Conform tests to editorconfig #102
1 parent 872d0f2 commit 55f2ba8

File tree

12 files changed

+113
-18
lines changed

12 files changed

+113
-18
lines changed

metafix/src/test/resources/org/metafacture/metafix/integration/lookup/fromJson/toJson/lookupInSubfieldInArrayOfObjectsWithListBind_complex/test.fix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set_array("animals[]")
22
do list(path: "test[]", "var": "$f")
3-
copy_field("$f", "animals[].$append.animal")
4-
copy_field("$f", "animals[].$last.classification.type")
3+
copy_field("$f", "animals[].$append.animal")
4+
copy_field("$f", "animals[].$last.classification.type")
55
end
66

77
do list(path: "animals[]")
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set_array("animals[]")
22
do list(path: "test[]", "var": "$f")
3-
copy_field("$f", "animals[].$append.animal")
4-
copy_field("$f", "animals[].$last.classification.type")
3+
copy_field("$f", "animals[].$append.animal")
4+
copy_field("$f", "animals[].$last.classification.type")
55
end
66

77
lookup("animals[].*.classification.type", "./mapfile.tsv", "sep_char":"\t")
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
set_array("animals[]")
22
do list(path: "metadata.real.test[]", "var": "$f")
33
lookup("$f.animal", "./mapfile_2.tsv", "sep_char":"\t")
4-
copy_field("$f.animal", "animals[].$append.animal")
5-
copy_field("$f.animal", "animals[].$last.classification.type")
4+
copy_field("$f.animal", "animals[].$append.animal")
5+
copy_field("$f.animal", "animals[].$last.classification.type")
66
end
77

88
lookup("animals[].*.classification.type", "./mapfile.tsv", "sep_char":"\t")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"creator" : [ {
3+
"id" : "test",
4+
"name" : "Max Musterfrau"
5+
}, {
6+
"id" : "test",
7+
"name" : "Uni Köln"
8+
}, {
9+
"id" : "test",
10+
"name" : "Bugs Bunny"
11+
}, {
12+
"id" : "test",
13+
"name" : "Carmen Santiego"
14+
} ]
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"creator" : [
3+
{
4+
"id" : "test",
5+
"name": "Musterfrau, Max"
6+
}, {
7+
"id" : "test",
8+
"name": "Uni Köln"
9+
}, {
10+
"id" : "test",
11+
"name": "Bugs Bunny"
12+
}, {
13+
"id" : "test",
14+
"name": "Santiego, Carmen"
15+
}
16+
]
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
replace_all("creator[].*.name","(.+), (.+)", "$2 $1")
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+
;

metafix/src/test/resources/org/metafacture/metafix/integration/method/fromJson/toJson/replace_allInSubfieldOfArrayOfObjectsWithAsterisk_complex/input.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,25 @@
22
"dateModified": "2020-01-01T13:05:29+00:00",
33
"datePublished": "2018-12-21T12:05:29+00:00",
44
"test" : [
5-
{
6-
"id" : "test"
7-
}
8-
]
5+
{
6+
"id" : "test"
7+
} ]
98
}
109
{
1110
"dateModified": "2016-08-10T22:05:29+00:00",
1211
"datePublished": "2013-12-21T12:05:29+00:00",
1312
"test" : [
14-
{
15-
"id" : "test"
16-
}
17-
]
13+
{
14+
"id" : "test"
15+
} ]
1816
}
1917
{
2018
"dateModified": "2010-08-29T12:05:29+00:00",
2119
"datePublished": "2000-01-21T12:05:29+00:00",
2220
"test" : [
23-
{
24-
"id" : "test"
25-
}
26-
]
21+
{
22+
"id" : "test"
23+
} ]
2724
}
2825

2926

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"id" : "test",
3+
"node" : {
4+
"dateModified" : "2019-07-23T09:25:58Z",
5+
"datePublished" : "2017-11-13T16:11:36Z"
6+
},
7+
"test" : [ {
8+
"id" : "test",
9+
"dateModified" : "2019-07-23",
10+
"dateCreated" : "2017-11-13"
11+
} ]
12+
}
13+
{
14+
"id" : "test",
15+
"node" : {
16+
"dateModified" : "2019-07-23T09:26:01Z",
17+
"datePublished" : "2017-11-13T15:36:34Z"
18+
},
19+
"test" : [ {
20+
"id" : "test",
21+
"dateModified" : "2019-07-23",
22+
"dateCreated" : "2017-11-13"
23+
} ]
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"id" : "test",
3+
"node" : {
4+
"dateModified" : "2019-07-23T09:25:58Z",
5+
"datePublished" : "2017-11-13T16:11:36Z"
6+
}
7+
}
8+
{
9+
"id" : "test",
10+
"node" : {
11+
"dateModified" : "2019-07-23T09:26:01Z",
12+
"datePublished" : "2017-11-13T15:36:34Z"
13+
}
14+
}
15+
16+
17+

0 commit comments

Comments
 (0)