Skip to content

Commit 389826b

Browse files
committed
Add integration test for replace with last Wildcard (#102)
1 parent 5dafbbe commit 389826b

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"key" : [ {
3+
"word" : "moo_value",
4+
"foo" : "bar"
5+
}, {
6+
"word" : "more_value",
7+
"foo" : "bar"
8+
}, {
9+
"word" : "even_m__re_value",
10+
"foo" : "bar"
11+
} ]
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"key" : [ {
3+
"word" : "moo_value",
4+
"foo" : "bar"
5+
}, {
6+
"word" : "more_value",
7+
"foo" : "bar"
8+
}, {
9+
"word" : "even_more_value",
10+
"foo" : "bar"
11+
} ]
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
replace_all("key[].$last.word", "o", "__")
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)