Skip to content

Commit

Permalink
➕ Adapt #t0044 test from JSON-LD API tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-scherbakov committed Jul 3, 2024
1 parent f14de0d commit e3d7ba7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/cases/flatten/0044-context.yamlld
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"@context":
term: http://example/term
3 changes: 3 additions & 0 deletions tests/cases/flatten/0044-in.yamlld
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- "@id": http://example/foo
http://example/term:
- "@value": value
6 changes: 6 additions & 0 deletions tests/cases/flatten/0044-out.yamlld
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"@context":
term: http://example/term
"@graph":
- "@id": http://example/foo
term:
- value
12 changes: 12 additions & 0 deletions tests/manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,18 @@
"input": "cases/local-context/expanded.yamlld",
"context": "cases/local-context/context.yamlld",
"expect": "cases/local-context/compacted.yamlld"
},
{
"@id": "#flatten",
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
"name": "compactArrays option",
"purpose": "Setting compactArrays to false causes single element arrays to be retained",
"option": {
"compactArrays": false
},
"input": "cases/flatten/0044-in.yamlld",
"context": "cases/flatten/0044-context.yamlld",
"expect": "cases/flatten/0044-out.yamlld"
}
]
}

0 comments on commit e3d7ba7

Please sign in to comment.