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

Commit

Permalink
Run test function sort_fields with new array handling
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Jan 24, 2022
1 parent 76344a4 commit 6a7fd39
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
28 changes: 14 additions & 14 deletions data/review/sort_field/result.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"animals" : [ "dog", "cat", "cat", "zebra" ],
"numbers" : [ "7", "2", "7", "1", "10" ],
"aumbers" : [ "7", "2", "1", "10" ],
"bnimals" : [ "dog", "cat", "zebra" ],
"bumbers" : [ "7", "2", "1", "10" ],
"animals" : [ "cat", "cat", "dog", "zebra" ],
"numbers" : [ "1", "10", "2", "7", "7" ],
"aumbers" : [ "1", "10", "2", "7" ],
"bnimals" : [ "cat", "dog", "zebra" ],
"bumbers" : [ "1", "10", "2", "7" ],
"animols" : {
"name" : "bird",
"cnimals" : [ "dog", "cat", "zebra" ],
"cumbers" : [ "7", "2", "1", "10" ]
"cnimals" : [ "cat", "dog", "zebra" ],
"cumbers" : [ "1", "10", "2", "7" ]
},
"others" : [ {
"name" : "Jake",
"dnimals" : [ "dog", "cat", "zebra" ],
"dumbers" : [ "7", "2", "1", "10" ]
"dnimals" : [ "cat", "dog", "zebra" ],
"dumbers" : [ "1", "10", "2", "7" ]
} ],
"OTHERS" : [ {
"name" : "Jake",
"enimals" : [ "dog", "cat", "zebra" ],
"eumbers" : [ "7", "2", "1", "10" ]
} ],
"xumbers" : [ "7", "7", "2", "1", "10", "1" ],
"ynimals" : [ "dog", "dog", "zebra", "cat", "zebra" ],
"yumbers" : [ "7", "7", "2", "1", "10", "1" ],
"znimals" : [ "dog", "dog", "zebra", "cat", "zebra" ],
"zumbers" : [ "7", "7", "2", "1", "10", "1" ]
"xumbers" : [ "1", "1", "10", "2", "7", "7" ],
"ynimals" : [ "cat", "dog", "dog", "zebra", "zebra" ],
"yumbers" : [ "1", "1", "10", "2", "7", "7" ],
"znimals" : [ "cat", "dog", "dog", "zebra", "zebra" ],
"zumbers" : [ "1", "1", "10", "2", "7", "7" ]
}
4 changes: 4 additions & 0 deletions data/review/sort_field/sort_field.fix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ sort_field("animals[]")
sort_field("numbers[]")

# Attributes with "1" is different to the metafacture approace with "true"
# All options do not work yet.
sort_field("aumbers[]",numeric:"1")
sort_field("bnimals[]",reverse:"1")
sort_field("bumbers[]", numeric:"1",reverse:"1")
Expand All @@ -10,6 +11,9 @@ sort_field("animols.cnimals[]")
sort_field("animols.cumbers[]",numeric:"1")
sort_field("others[].1.dnimals[]")
sort_field("others[].1.dumbers[]",numeric:"1")

# Selecting arrays with * does not work

sort_field("OTHERS[].*.enimals[]")
sort_field("OTHERS[].*.eumbers[]",numeric:"1")
sort_field("xumbers[]", uniq:"1")
Expand Down

0 comments on commit 6a7fd39

Please sign in to comment.