Skip to content

Commit 02652c9

Browse files
authored
Merge pull request #188 from metafacture/160-integrationTestsForConditionals
Add simple integration tests for conditionals and for #187
2 parents a957e85 + 5873311 commit 02652c9

File tree

104 files changed

+947
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+947
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"type" : "dog"
3+
}
4+
{
5+
"type" : "video"
6+
}
7+
{
8+
"type" : "book",
9+
"test" : "test"
10+
}
11+
{
12+
"type" : "stone"
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"type" : "dog"
3+
}
4+
{
5+
"type" : "video"
6+
}
7+
{
8+
"type" : "book"
9+
}
10+
{
11+
"type" : "stone"
12+
}
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if any_equal("type", "book")
2+
add_field("test", "test")
3+
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+
;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"type" : [ "dog", "dog", "dog" ],
3+
"test" : "test"
4+
}
5+
{
6+
"type" : [ "video", "dog", "dog" ],
7+
"test" : "test"
8+
}
9+
{
10+
"type" : [ "book", "pc" ]
11+
}
12+
{
13+
"type" : [ "human", "cat" ]
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"type" : [ "dog", "dog", "dog" ]
3+
}
4+
{
5+
"type" : [ "video", "dog", "dog" ]
6+
}
7+
{
8+
"type" : [ "book", "pc" ]
9+
}
10+
{
11+
"type" : [ "human", "cat" ]
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if all_contain("type[]", "o")
2+
add_field("test", "test")
3+
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+
;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"type" : "dog"
3+
}
4+
{
5+
"type" : "video",
6+
"test" : "test"
7+
}
8+
{
9+
"type" : "book"
10+
}
11+
{
12+
"type" : "stone",
13+
"test" : "test"
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"type" : "dog"
3+
}
4+
{
5+
"type" : "video"
6+
}
7+
{
8+
"type" : "book"
9+
}
10+
{
11+
"type" : "stone"
12+
}

0 commit comments

Comments
 (0)