Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
Merge pull request #184 from metafacture/160-addIntegrationTestsFor121
Browse files Browse the repository at this point in the history
160-addIntegrationTestsFor121
  • Loading branch information
TobiasNx authored Mar 2, 2022
2 parents c94a9ba + a6a4663 commit 6d74bca
Show file tree
Hide file tree
Showing 97 changed files with 539 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"investigators" : "Justus?Peter?Bob"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"investigators" : [ "Justus", "Peter", "Bob" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
join_field("investigators[]","?")
move_field("investigators[]","investigators")
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"key" : [ "value", "m__re_value", "even_m__re_value" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"key" : [ "value", "more_value", "even_more_value" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
replace_all("key[].*", "o", "__")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key" : [ {
"foo" : "bar",
"word" : "value"
}, {
"foo" : "bar",
"word" : "m__re_value"
}, {
"foo" : "bar",
"word" : "even_m__re_value"
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key" : [ {
"word" : "value",
"foo" : "bar"
}, {
"word" : "more_value",
"foo" : "bar"
}, {
"word" : "even_more_value",
"foo" : "bar"
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
replace_all("key[].*.word", "o", "__")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"key" : "b__ard"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"key" : "board"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
replace_all("key", "o", "__")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See issue #121
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"animals" : [ "zebra", "cat", "dog" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"animals" : [ "dog", "cat", "zebra" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reverse("animals[]")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"animal" : "ynnub",
"animal_2" : {
"name" : "bird",
"type" : "TSET"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"animal": "bunny",
"animal_2": {
"name": "bird",
"type": "TEST"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reverse("animal")
reverse("animal_2.type")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See issue #121
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"test": [{
"key": "1_eulav",
"test": "test_1"
},{
"key": "2_eulav",
"test": "test_2"
},{
"key": "3_eulav",
"test": "test_3"
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"test": [{
"key": "value_1",
"test": "test_1"
},{
"key": "value_2",
"test": "test_2"
},{
"key": "value_3",
"test": "test_3"
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reverse("test[].*.key")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See issue #121
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"animals" : [ "god", "tac", "arbez" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"animals": [ "dog", "cat", "zebra" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reverse("animals[].*")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See issue #121
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"adventureDuo": [ {
"name" : "Jake",
"animal" : "dog",
"tools" : [ "arms", "magic", "shapeShifting" ]
}, {
"name" : "Finn",
"animal" : "human",
"tools" : [ "anotherSword", "arm", "sword" ]
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"adventureDuo": [ {
"name" : "Jake",
"animal" : "dog",
"tools" : [ "magic", "arms", "shapeShifting" ]
}, {
"name" : "Finn",
"animal" : "human",
"tools" : [ "sword", "anotherSword", "arm" ]
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sort_field("adventureDuo[].*.tools[]")

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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"animals" : [ "cat", "cat", "dog", "zebra" ],
"animals_2" : [ "zebra", "dog", "cat", "cat" ],
"animals_3" : [ "cat", "dog", "zebra" ],
"numbers" : [ "1", "10", "2", "7", "7" ],
"numbers_2" : [ "1", "2", "7", "7", "10" ],
"numbers_3" : [ "10", "7", "7", "2", "1" ],
"numbers_4" : [ "1", "2", "7", "10" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"animals" : [ "dog", "cat", "cat", "zebra" ],
"animals_2" : [ "dog", "cat", "cat", "zebra" ],
"animals_3" : [ "dog", "cat", "cat", "zebra" ],
"numbers" : [ "7", "2", "7", "1", "10" ],
"numbers_2" : [ "7", "2", "7", "1", "10" ],
"numbers_3" : [ "7", "2", "7", "1", "10" ],
"numbers_4" : [ "7", "2", "7", "1", "10" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sort_field("animals[]")
sort_field("numbers[]")
sort_field("numbers_2[]",numeric:"true")
sort_field("animals_2[]",reverse:"true")
sort_field("numbers_3[]", numeric:"true",reverse:"true")
sort_field("animals_3[]", uniq:"true")
sort_field("numbers_4[]",numeric:"true", uniq:"true")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tools" : "magic",
"tools" : "arms",
"tools" : "shapeShifting"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"tools" : "magic--arms--shapeShifting"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
split_field("tools", "--")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See issue #121
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"adventureDuo" : [ {
"name" : "Jake",
"animal" : "dog",
"tools" : "magic",
"tools" : "arms",
"tools" : "shapeShifting"
}, {
"name" : "Finn",
"animal" : "human",
"tools" : "sword",
"tools" : "anotherSword",
"tools" : "arm"
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"adventureDuo": [ {
"name" : "Jake",
"animal" : "dog",
"tools" : "magic--arms--shapeShifting"
}, {
"name" : "Finn",
"animal" : "human",
"tools" : "sword--anotherSword--arm"
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
split_field("adventureDuo[].*.tools", "--")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"people" : {
"investigators" : "Justus",
"investigators" : "Peter",
"investigators" : "Bob"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"people" : {
"investigators" : "Justus?Peter?Bob"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
split_field("people.investigators","\\?")
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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"numbers" : [ "27" ],
"numbers_2" : [ "10" ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"numbers" : [ "7", "2", "7", "1", "10" ],
"numbers_2" : [ "1", "2", "3", "4"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sum("numbers[]")
sum("numbers_2[]")

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")
;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See issue #121
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"objects" : [ {
"numbers" : [ "27" ]
}, {
"numbers" : [ "10"]
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"objects" : [ {
"numbers" : [ "7", "2", "7", "1", "10" ]
}, {
"numbers" : [ "1", "2", "3", "4"]
} ]
}
Loading

0 comments on commit 6d74bca

Please sign in to comment.