Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
Add test for moving a field to its own subfield
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Feb 1, 2022
1 parent 3c18996 commit a2652d3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/testing/moveToNewOwnSubfield/animalsStrings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"fictional": "unicorn"
}
5 changes: 5 additions & 0 deletions data/testing/moveToNewOwnSubfield/expected_string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"fictional": {
"animal": "unicorn"
}
}
1 change: 1 addition & 0 deletions data/testing/moveToNewOwnSubfield/moveToNewOwnSubfield.fix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
move_field("fictional", "fictional.animal")
10 changes: 10 additions & 0 deletions data/testing/moveToNewOwnSubfield/moveToNewOwnSubfield.flux
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
infile = FLUX_DIR + "animalsStrings.json";

infile
| open-file
| as-records
| decode-json
| fix(FLUX_DIR + "moveToNewOwnSubfield.fix")
| encode-json(prettyPrinting="true")
| write(FLUX_DIR + "result_string.json")
;
Empty file.

0 comments on commit a2652d3

Please sign in to comment.