Skip to content

Commit b85d835

Browse files
committed
Add integration test for #200
1 parent 8884f66 commit b85d835

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"arrayOfStrings" : [ "one", "two", "three" ],
3+
"object" : {
4+
"field" : "five",
5+
"field_2" : "six"
6+
},
7+
"arrayOfObjects" : [ {
8+
"field_3" : "SEVEN",
9+
"field_4" : "abcight"
10+
}, {
11+
"field_3" : "NINE",
12+
"field_4" : "tabcn"
13+
} ],
14+
"test" : [ "one", "two", "three" ]
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"arrayOfStrings" : [ "one", "two", "three" ],
3+
"object" : {
4+
"field" : "five",
5+
"field_2" : "six"
6+
},
7+
"arrayOfObjects" : [ {
8+
"field_3" : "seven",
9+
"field_4" : "eight"
10+
}, {
11+
"field_3" : "nine",
12+
"field_4" : "ten"
13+
} ]
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
put_vars(
2+
"test": "arrayOfStrings[]",
3+
"test_2": "arrayOfObjects[]"
4+
)
5+
set_array("test[]")
6+
do list (path: "$[test]", "var": "$i")
7+
copy_field("$i", "test[].$append")
8+
end
9+
10+
do list (path: "$[test_2]", "var": "$i")
11+
upcase("$i.field_3")
12+
replace_all("$i.field_4","e","abc")
13+
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)