Manifest
name: Compaction
description: These tests implement the requirements for the JSON-LD [Compaction Algorithm](https://www.w3.org/TR/json-ld11-api/#compaction-algorithm).
base iri: https://w3c.github.io/json-ld-api/tests/
sequence: t0001
sequence: t0002
sequence: t0003
sequence: t0004
sequence: t0005
sequence: t0006
sequence: t0007
sequence: t0008
sequence: t0009
sequence: t0010
sequence: t0011
sequence: t0012
sequence: t0013
sequence: t0014
sequence: t0015
sequence: t0016
sequence: t0017
sequence: t0018
sequence: t0019
sequence: t0020
sequence: t0021
sequence: t0022
sequence: t0023
sequence: t0024
sequence: t0025
sequence: t0026
sequence: t0027
sequence: t0028
sequence: t0029
sequence: t0030
sequence: t0031
sequence: t0032
sequence: t0033
sequence: t0034
sequence: t0035
sequence: t0036
sequence: t0037
sequence: t0038
sequence: ta038
sequence: t0039
sequence: t0040
sequence: t0041
sequence: t0042
sequence: t0043
sequence: t0044
sequence: t0045
sequence: t0046
sequence: t0047
sequence: t0048
sequence: t0049
sequence: t0050
sequence: t0051
sequence: t0052
sequence: t0053
sequence: t0054
sequence: t0055
sequence: t0056
sequence: t0057
sequence: t0058
sequence: t0059
sequence: t0060
sequence: t0061
sequence: t0062
sequence: t0063
sequence: t0064
sequence: t0065
sequence: t0066
sequence: t0067
sequence: t0068
sequence: t0069
sequence: t0070
sequence: t0071
sequence: t0072
sequence: t0073
sequence: t0074
sequence: t0075

t0001
type: PositiveEvaluationTest
type: CompactTest
name: drop free-floating nodes
purpose: Unreferenced nodes not containing properties are dropped
input: compact/0001-in.jsonld
context: compact/0001-context.jsonld
expect: compact/0001-out.jsonld

t0002
type: PositiveEvaluationTest
type: CompactTest
name: basic
purpose: Basic term and value compaction
input: compact/0002-in.jsonld
context: compact/0002-context.jsonld
expect: compact/0002-out.jsonld

t0003
type: PositiveEvaluationTest
type: CompactTest
name: drop null and unmapped properties
purpose: Properties mapped to null or which are never mapped are dropped
input: compact/0003-in.jsonld
context: compact/0003-context.jsonld
expect: compact/0003-out.jsonld

t0004
type: PositiveEvaluationTest
type: CompactTest
name: optimize @set, keep empty arrays
purpose: Containers mapped to @set keep empty arrays
input: compact/0004-in.jsonld
context: compact/0004-context.jsonld
expect: compact/0004-out.jsonld

t0005
type: PositiveEvaluationTest
type: CompactTest
name: @type and prefix compaction
purpose: Compact uses prefixes in @type
input: compact/0005-in.jsonld
context: compact/0005-context.jsonld
expect: compact/0005-out.jsonld

t0006
type: PositiveEvaluationTest
type: CompactTest
name: keep expanded object format if @type doesn't match
purpose: Values not matching a coerced @type remain in expanded form
input: compact/0006-in.jsonld
context: compact/0006-context.jsonld
expect: compact/0006-out.jsonld

t0007
type: PositiveEvaluationTest
type: CompactTest
name: add context
purpose: External context is added to the compacted document
input: compact/0007-in.jsonld
context: compact/0007-context.jsonld
expect: compact/0007-out.jsonld

t0008
type: PositiveEvaluationTest
type: CompactTest
name: alias keywords
purpose: Aliases for keywords are used in compacted document
input: compact/0008-in.jsonld
context: compact/0008-context.jsonld
expect: compact/0008-out.jsonld

t0009
type: PositiveEvaluationTest
type: CompactTest
name: compact @id
purpose: Value with @id is compacted to string if property cast to @id
input: compact/0009-in.jsonld
context: compact/0009-context.jsonld
expect: compact/0009-out.jsonld

t0010
type: PositiveEvaluationTest
type: CompactTest
name: array to @graph
purpose: An array of objects is serialized with @graph
input: compact/0010-in.jsonld
context: compact/0010-context.jsonld
expect: compact/0010-out.jsonld

t0011
type: PositiveEvaluationTest
type: CompactTest
name: compact date
purpose: Expanded value with type xsd:dateTime is represented as string with type coercion
input: compact/0011-in.jsonld
context: compact/0011-context.jsonld
expect: compact/0011-out.jsonld

t0012
type: PositiveEvaluationTest
type: CompactTest
name: native types
purpose: Native values are unmodified during compaction
input: compact/0012-in.jsonld
context: compact/0012-context.jsonld
expect: compact/0012-out.jsonld

t0013
type: PositiveEvaluationTest
type: CompactTest
name: @value with @language
purpose: Values with @language remain in expanded form by default
input: compact/0013-in.jsonld
context: compact/0013-context.jsonld
expect: compact/0013-out.jsonld

t0014
type: PositiveEvaluationTest
type: CompactTest
name: array to aliased @graph
purpose: Aliasing @graph uses alias in compacted document
input: compact/0014-in.jsonld
context: compact/0014-context.jsonld
expect: compact/0014-out.jsonld

t0015
type: PositiveEvaluationTest
type: CompactTest
name: best match compaction
purpose: Property with values of different types use most appropriate term when compacting
input: compact/0015-in.jsonld
context: compact/0015-context.jsonld
expect: compact/0015-out.jsonld

t0016
type: PositiveEvaluationTest
type: CompactTest
name: recursive named graphs
purpose: Compacting a document with multiple embedded uses of @graph
input: compact/0016-in.jsonld
context: compact/0016-context.jsonld
expect: compact/0016-out.jsonld

t0017
type: PositiveEvaluationTest
type: CompactTest
name: A term mapping to null removes the mapping
purpose: Mapping a term to null causes the property and its values to be removed from the compacted document
input: compact/0017-in.jsonld
context: compact/0017-context.jsonld
expect: compact/0017-out.jsonld

t0018
type: PositiveEvaluationTest
type: CompactTest
name: best matching term for lists
purpose: Lists with values of different types use best term in compacted document
input: compact/0018-in.jsonld
context: compact/0018-context.jsonld
expect: compact/0018-out.jsonld

t0019
type: PositiveEvaluationTest
type: CompactTest
name: Keep duplicate values in @list and @set
purpose: Duplicate values in @list or @set are retained in compacted document
input: compact/0019-in.jsonld
context: compact/0019-context.jsonld
expect: compact/0019-out.jsonld

t0020
type: PositiveEvaluationTest
type: CompactTest
name: Compact @id that is a property IRI when @container is @list
purpose: A term with @container: @list is also used as the value of an @id, if appropriate
input: compact/0020-in.jsonld
context: compact/0020-context.jsonld
expect: compact/0020-out.jsonld

t0021
type: PositiveEvaluationTest
type: CompactTest
name: Compact properties and types using @vocab
purpose: @vocab is used to create relative properties and types if no other term matches
input: compact/0021-in.jsonld
context: compact/0021-context.jsonld
expect: compact/0021-out.jsonld

t0022
type: PositiveEvaluationTest
type: CompactTest
name: @list compaction of nested properties
purpose: Compact nested properties using @list containers
input: compact/0022-in.jsonld
context: compact/0022-context.jsonld
expect: compact/0022-out.jsonld

t0023
type: PositiveEvaluationTest
type: CompactTest
name: prefer @vocab over compacted IRIs
purpose: @vocab takes precedence over prefixes - even if the result is longer
input: compact/0023-in.jsonld
context: compact/0023-context.jsonld
expect: compact/0023-out.jsonld

t0024
type: PositiveEvaluationTest
type: CompactTest
name: most specific term matching in @list.
purpose: The most specific term that matches all of the elements in the list, taking into account the default language, must be selected.
input: compact/0024-in.jsonld
context: compact/0024-context.jsonld
expect: compact/0024-out.jsonld

t0025
type: PositiveEvaluationTest
type: CompactTest
name: Language maps
purpose: Multiple values with different languages use language maps if property has @container: @language
input: compact/0025-in.jsonld
context: compact/0025-context.jsonld
expect: compact/0025-out.jsonld

t0026
type: PositiveEvaluationTest
type: CompactTest
name: Language map term selection with complications
purpose: Test appropriate property use given language maps with @vocab, a default language, and a competing term
input: compact/0026-in.jsonld
context: compact/0026-context.jsonld
expect: compact/0026-out.jsonld

t0027
type: PositiveEvaluationTest
type: CompactTest
name: @container: @set with multiple values
purpose: Fall back to term with @set container if term with language map is defined
input: compact/0027-in.jsonld
context: compact/0027-context.jsonld
expect: compact/0027-out.jsonld

t0028
type: PositiveEvaluationTest
type: CompactTest
name: Alias keywords and use @vocab
purpose: Combination of keyword aliases and @vocab
input: compact/0028-in.jsonld
context: compact/0028-context.jsonld
expect: compact/0028-out.jsonld

t0029
type: PositiveEvaluationTest
type: CompactTest
name: Simple @index map
purpose: Output uses index mapping if term is defined with @container: @index
input: compact/0029-in.jsonld
context: compact/0029-context.jsonld
expect: compact/0029-out.jsonld

t0030
type: PositiveEvaluationTest
type: CompactTest
name: non-matching @container: @index
purpose: Preserve @index tags if not compacted to an index map
input: compact/0030-in.jsonld
context: compact/0030-context.jsonld
expect: compact/0030-out.jsonld

t0031
type: PositiveEvaluationTest
type: CompactTest
name: Compact @reverse
purpose: Compact traverses through @reverse
input: compact/0031-in.jsonld
context: compact/0031-context.jsonld
expect: compact/0031-out.jsonld

t0032
type: PositiveEvaluationTest
type: CompactTest
name: Compact keys in reverse-maps
purpose: Compact traverses through @reverse
input: compact/0032-in.jsonld
context: compact/0032-context.jsonld
expect: compact/0032-out.jsonld

t0033
type: PositiveEvaluationTest
type: CompactTest
name: Compact reverse-map to reverse property
purpose: A reverse map is replaced with a matching property defined with @reverse
input: compact/0033-in.jsonld
context: compact/0033-context.jsonld
expect: compact/0033-out.jsonld

t0034
type: PositiveEvaluationTest
type: CompactTest
name: Skip property with @reverse if no match
purpose: Do not use reverse property if no other property matches as normal property
input: compact/0034-in.jsonld
context: compact/0034-context.jsonld
expect: compact/0034-out.jsonld

t0035
type: PositiveEvaluationTest
type: CompactTest
name: Compact @reverse node references using strings
purpose: Compact node references to strings for reverse properties using @type: @id
input: compact/0035-in.jsonld
context: compact/0035-context.jsonld
expect: compact/0035-out.jsonld

t0036
type: PositiveEvaluationTest
type: CompactTest
name: Compact reverse properties using index containers
purpose: Compact using both reverse properties and index containers
input: compact/0036-in.jsonld
context: compact/0036-context.jsonld
expect: compact/0036-out.jsonld

t0037
type: PositiveEvaluationTest
type: CompactTest
name: Compact keys in @reverse using @vocab
purpose: Compact keys in @reverse using @vocab
input: compact/0037-in.jsonld
context: compact/0037-context.jsonld
expect: compact/0037-out.jsonld

t0038
type: PositiveEvaluationTest
type: CompactTest
name: Index map round-tripping
purpose: Complex round-tripping use case from Drupal
option:
  spec version: json-ld-1.0
input: compact/0038-in.jsonld
context: compact/0038-context.jsonld
expect: compact/0038-out.jsonld

ta038
type: PositiveEvaluationTest
type: CompactTest
name: Index map round-tripping
purpose: Complex round-tripping use case from Drupal
option:
  spec version: json-ld-1.1
input: compact/0038-in.jsonld
context: compact/0038-context.jsonld
expect: compact/0038a-out.jsonld

t0039
type: PositiveEvaluationTest
type: CompactTest
name: @graph is array
purpose: Value of @graph is always an array
input: compact/0039-in.jsonld
context: compact/0039-context.jsonld
expect: compact/0039-out.jsonld

t0040
type: PositiveEvaluationTest
type: CompactTest
name: @list is array
purpose: Ensure that value of @list is always an array
input: compact/0040-in.jsonld
context: compact/0040-context.jsonld
expect: compact/0040-out.jsonld

t0041
type: PositiveEvaluationTest
type: CompactTest
name: index rejects term having @list
purpose: If an index is present, a term having an @list container is not selected
input: compact/0041-in.jsonld
context: compact/0041-context.jsonld
expect: compact/0041-out.jsonld

t0042
type: PositiveEvaluationTest
type: CompactTest
name: @list keyword aliasing
purpose: Make sure keyword aliasing works if a list can't be compacted
input: compact/0042-in.jsonld
context: compact/0042-context.jsonld
expect: compact/0042-out.jsonld

t0043
type: PositiveEvaluationTest
type: CompactTest
name: select term over @vocab
purpose: Ensure that @vocab compaction isn't used if the result collides with a term
input: compact/0043-in.jsonld
context: compact/0043-context.jsonld
expect: compact/0043-out.jsonld

t0044
type: PositiveEvaluationTest
type: CompactTest
name: @type: @vocab in reverse-map
purpose: Prefer properties with @type: @vocab in reverse-maps if the value can be compacted to a term
input: compact/0044-in.jsonld
context: compact/0044-context.jsonld
expect: compact/0044-out.jsonld

t0045
type: PositiveEvaluationTest
type: CompactTest
name: @id value uses relative IRI, not term
purpose: Values of @id are transformed to relative IRIs, terms are ignored
input: compact/0045-in.jsonld
context: compact/0045-context.jsonld
expect: compact/0045-out.jsonld

t0046
type: PositiveEvaluationTest
type: CompactTest
name: multiple objects without @context use @graph
purpose: Wrap top-level array into @graph even if no context is passed
input: compact/0046-in.jsonld
context: compact/0046-context.jsonld
expect: compact/0046-out.jsonld

t0047
type: PositiveEvaluationTest
type: CompactTest
name: Round-trip relative URLs
purpose: Relative URLs remain relative after compaction
input: compact/0047-in.jsonld
context: compact/0047-context.jsonld
expect: compact/0047-out.jsonld

t0048
type: PositiveEvaluationTest
type: CompactTest
name: term with @language: null
purpose: Prefer terms with a language mapping set to null over terms without language-mapping for non-strings
input: compact/0048-in.jsonld
context: compact/0048-context.jsonld
expect: compact/0048-out.jsonld

t0049
type: PositiveEvaluationTest
type: CompactTest
name: Round tripping of lists that contain just IRIs
purpose: List compaction without @container: @list still uses strings if @type: @id
input: compact/0049-in.jsonld
context: compact/0049-context.jsonld
expect: compact/0049-out.jsonld

t0050
type: PositiveEvaluationTest
type: CompactTest
name: Reverse properties require @type: @id to use string values
purpose: Node references in reverse properties are not compacted to strings without explicit type-coercion
input: compact/0050-in.jsonld
context: compact/0050-context.jsonld
expect: compact/0050-out.jsonld

t0051
type: PositiveEvaluationTest
type: CompactTest
name: Round tripping @list with scalar
purpose: Native values survive round-tripping with @list
input: compact/0051-in.jsonld
context: compact/0051-context.jsonld
expect: compact/0051-out.jsonld

t0052
type: PositiveEvaluationTest
type: CompactTest
name: Round tripping @list with scalar and @graph alias
purpose: Native values survive round-tripping with @list and @graph alias
input: compact/0052-in.jsonld
context: compact/0052-context.jsonld
expect: compact/0052-out.jsonld

t0053
type: PositiveEvaluationTest
type: CompactTest
name: Use @type: @vocab if no @type: @id
purpose: Compact to @type: @vocab when no @type: @id term available
input: compact/0053-in.jsonld
context: compact/0053-context.jsonld
expect: compact/0053-out.jsonld

t0054
type: PositiveEvaluationTest
type: CompactTest
name: Compact to @type: @vocab and compact @id to term
purpose: Compact to @type: @vocab and compact @id to term
input: compact/0054-in.jsonld
context: compact/0054-context.jsonld
expect: compact/0054-out.jsonld

t0055
type: PositiveEvaluationTest
type: CompactTest
name: Round tripping @type: @vocab
purpose: Compacting IRI value of property with @type: @vocab can use term
input: compact/0055-in.jsonld
context: compact/0055-context.jsonld
expect: compact/0055-out.jsonld

t0056
type: PositiveEvaluationTest
type: CompactTest
name: Prefer @type: @vocab over @type: @id for terms
purpose: Compacting IRI value of property with @type: @vocab can use term
input: compact/0056-in.jsonld
context: compact/0056-context.jsonld
expect: compact/0056-out.jsonld

t0057
type: PositiveEvaluationTest
type: CompactTest
name: Complex round tripping @type: @vocab and @type: @id
purpose: Compacting IRI value of property with @type: @vocab can use term; more complex
input: compact/0057-in.jsonld
context: compact/0057-context.jsonld
expect: compact/0057-out.jsonld

t0058
type: PositiveEvaluationTest
type: CompactTest
name: Prefer @type: @id over @type: @vocab for non-terms
purpose: Choose a term having @type: @id over @type: @value if value is not a term
input: compact/0058-in.jsonld
context: compact/0058-context.jsonld
expect: compact/0058-out.jsonld

t0059
type: PositiveEvaluationTest
type: CompactTest
name: Term with @type: @vocab if no @type: @id
purpose: If there's no term with @type: @id, use terms with @type: @vocab for IRIs not mapped to terms
input: compact/0059-in.jsonld
context: compact/0059-context.jsonld
expect: compact/0059-out.jsonld

t0060
type: PositiveEvaluationTest
type: CompactTest
name: Term with @type: @id if no @type: @vocab and term value
purpose: If there's no term with @type: @vocab, use terms with @type: @id for IRIs mapped to terms
input: compact/0060-in.jsonld
context: compact/0060-context.jsonld
expect: compact/0060-out.jsonld

t0061
type: PositiveEvaluationTest
type: CompactTest
name: @type: @vocab/@id with values matching either
purpose: Separate IRIs for the same property to use term with more specific @type (@id vs. @vocab)
input: compact/0061-in.jsonld
context: compact/0061-context.jsonld
expect: compact/0061-out.jsonld

t0062
type: PositiveEvaluationTest
type: CompactTest
name: @type: @vocab and relative IRIs
purpose: Relative IRIs don't round-trip with @type: @vocab
input: compact/0062-in.jsonld
context: compact/0062-context.jsonld
expect: compact/0062-out.jsonld

t0063
type: PositiveEvaluationTest
type: CompactTest
name: Compact IRI round-tripping with @type: @vocab
purpose: Term with @type: @vocab will use compact IRIs
input: compact/0063-in.jsonld
context: compact/0063-context.jsonld
expect: compact/0063-out.jsonld

t0064
type: PositiveEvaluationTest
type: CompactTest
name: Compact language-tagged and indexed strings to index-map
purpose: Given values with both @index and @language and term index-map term, use index map
input: compact/0064-in.jsonld
context: compact/0064-context.jsonld
expect: compact/0064-out.jsonld

t0065
type: PositiveEvaluationTest
type: CompactTest
name: Language-tagged and indexed strings with language-map
purpose: Language-tagged and indexed strings don't compact to language-map
input: compact/0065-in.jsonld
context: compact/0065-context.jsonld
expect: compact/0065-out.jsonld

t0066
type: PositiveEvaluationTest
type: CompactTest
name: Relative IRIs
purpose: Complex use cases for relative IRI compaction
input: compact/0066-in.jsonld
context: compact/0066-context.jsonld
expect: compact/0066-out.jsonld

t0067
type: PositiveEvaluationTest
type: CompactTest
name: Reverse properties with blank nodes
purpose: Compact reverse property whose values are unlabeled blank nodes
input: compact/0067-in.jsonld
context: compact/0067-context.jsonld
expect: compact/0067-out.jsonld

t0068
type: PositiveEvaluationTest
type: CompactTest
name: Single value reverse properties
purpose: Single values of reverse properties are compacted as values of ordinary properties
input: compact/0068-in.jsonld
context: compact/0068-context.jsonld
expect: compact/0068-out.jsonld

t0069
type: PositiveEvaluationTest
type: CompactTest
name: Single value reverse properties with @set
purpose: Single values are kept in array form for reverse properties if the container is to @set
input: compact/0069-in.jsonld
context: compact/0069-context.jsonld
expect: compact/0069-out.jsonld

t0070
type: PositiveEvaluationTest
type: CompactTest
name: compactArrays option
purpose: Setting compactArrays to false causes single element arrays to be retained
option:
  compact arrays: false
input: compact/0070-in.jsonld
context: compact/0070-context.jsonld
expect: compact/0070-out.jsonld

t0071
type: PositiveEvaluationTest
type: CompactTest
name: Input has multiple @contexts, output has one
purpose: Expanding input with multiple @contexts and compacting with just one doesn't output undefined properties
input: compact/0071-in.jsonld
context: compact/0071-context.jsonld
expect: compact/0071-out.jsonld

t0072
type: PositiveEvaluationTest
type: CompactTest
name: Default language and unmapped properties
purpose: Ensure that the default language is handled correctly for unmapped properties
input: compact/0072-in.jsonld
context: compact/0072-context.jsonld
expect: compact/0072-out.jsonld

t0073
type: PositiveEvaluationTest
type: CompactTest
name: Mapped @id and @type
purpose: Ensure that compaction works with mapped @id and @type
input: compact/0073-in.jsonld
context: compact/0073-context.jsonld
expect: compact/0073-out.jsonld

t0074
type: PositiveEvaluationTest
type: CompactTest
name: Container as a list with type of @id
purpose: Ensure that compaction works for empty list when property has container declared as @list and type as @id
input: compact/0074-in.jsonld
context: compact/0074-context.jsonld
expect: compact/0074-out.jsonld

t0075
type: PositiveEvaluationTest
type: CompactTest
name: Compact using relative fragment identifier
purpose: Compacting a relative round-trips
option:
  processing mode: json-ld-1.0
  base: http://example.org/
input: compact/0075-in.jsonld
context: compact/0075-context.jsonld
expect: compact/0075-out.jsonld

t0076
type: PositiveEvaluationTest
type: CompactTest
name: Compacting IRI equivalent to base
purpose: Compacting IRI equivalent to base, uses last path segment of base ending in '/'
input: compact/0076-in.jsonld
context: compact/0076-context.jsonld
expect: compact/0076-out.jsonld

t0077
type: PositiveEvaluationTest
type: CompactTest
name: Compact a @graph container
purpose: Compact a @graph container
input: compact/0077-in.jsonld
context: compact/0077-context.jsonld
expect: compact/0077-out.jsonld
option:
  spec version: json-ld-1.1

t0078
type: PositiveEvaluationTest
type: CompactTest
name: Compact a [@graph, @set] container
purpose: Compact with [@graph, @set]
input: compact/0078-in.jsonld
context: compact/0078-context.jsonld
expect: compact/0078-out.jsonld
option:
  spec version: json-ld-1.1

t0079
type: PositiveEvaluationTest
type: CompactTest
name: Compact a @graph container having @index
purpose: Verify that having both @graph and @index allows @graph container compaction
input: compact/0079-in.jsonld
context: compact/0079-context.jsonld
expect: compact/0079-out.jsonld
option:
  spec version: json-ld-1.1

t0080
type: PositiveEvaluationTest
type: CompactTest
name: Do not compact a graph having @id with a term having an @graph container
purpose: Graph compaction works only on simple graphs
input: compact/0080-in.jsonld
context: compact/0080-context.jsonld
expect: compact/0080-out.jsonld
option:
  spec version: json-ld-1.1

t0081
type: PositiveEvaluationTest
type: CompactTest
name: Compact a [@graph, @index] container
purpose: Compact a @graph container with @index
input: compact/0081-in.jsonld
context: compact/0081-context.jsonld
expect: compact/0081-out.jsonld
option:
  spec version: json-ld-1.1

t0082
type: PositiveEvaluationTest
type: CompactTest
name: Compact a [@graph, @index, @set] container
purpose: Compact a @graph container with @index and @set
input: compact/0082-in.jsonld
context: compact/0082-context.jsonld
expect: compact/0082-out.jsonld
option:
  spec version: json-ld-1.1

t0083
type: PositiveEvaluationTest
type: CompactTest
name: [@graph, @index] does not compact graph with @id
purpose: Graph compaction with @graph and @index works only on simple graphs
input: compact/0083-in.jsonld
context: compact/0083-context.jsonld
expect: compact/0083-out.jsonld
option:
  spec version: json-ld-1.1

t0084
type: PositiveEvaluationTest
type: CompactTest
name: Compact a simple graph with a [@graph, @id] container
purpose: Compact a simple graph using a @graph container with @id
input: compact/0084-in.jsonld
context: compact/0084-context.jsonld
expect: compact/0084-out.jsonld
option:
  spec version: json-ld-1.1

t0085
type: PositiveEvaluationTest
type: CompactTest
name: Compact a named graph with a [@graph, @id] container
purpose: Compact a named graph using a @graph container with @id
input: compact/0085-in.jsonld
context: compact/0085-context.jsonld
expect: compact/0085-out.jsonld
option:
  spec version: json-ld-1.1

t0086
type: PositiveEvaluationTest
type: CompactTest
name: Compact a simple graph with a [@graph, @id, @set] container
purpose: Compact a simple graph using a @graph container with @id and @set
input: compact/0086-in.jsonld
context: compact/0086-context.jsonld
expect: compact/0086-out.jsonld
option:
  spec version: json-ld-1.1

t0087
type: PositiveEvaluationTest
type: CompactTest
name: Compact a named graph with a [@graph, @id, @set] container
purpose: Compact a named graph using a @graph container with @id and @set
input: compact/0087-in.jsonld
context: compact/0087-context.jsonld
expect: compact/0087-out.jsonld
option:
  spec version: json-ld-1.1

t0088
type: PositiveEvaluationTest
type: CompactTest
name: Compact a graph with @index using a [@graph, @id] container
purpose: Compact a @graph container with @id and @set, discarding an @index value
input: compact/0088-in.jsonld
context: compact/0088-context.jsonld
expect: compact/0088-out.jsonld
option:
  spec version: json-ld-1.1

t0089
type: PositiveEvaluationTest
type: CompactTest
name: Language map term selection with complications
purpose: Test appropriate property use given language maps with @vocab, a default language, no language, and competing terms
input: compact/0089-in.jsonld
context: compact/0089-context.jsonld
expect: compact/0089-out.jsonld

t0090
type: PositiveEvaluationTest
type: CompactTest
name: Compact input with @graph container to output without @graph container
purpose: Ensure @graph appears properly in output
input: compact/0090-in.jsonld
context: compact/0090-context.jsonld
expect: compact/0090-out.jsonld
option:
  spec version: json-ld-1.1

t0091
type: PositiveEvaluationTest
type: CompactTest
name: Compact input with @graph container to output without @graph container with compactArrays unset
purpose: Ensure @graph appears properly in output with compactArrays unset
input: compact/0091-in.jsonld
context: compact/0091-context.jsonld
expect: compact/0091-out.jsonld
option:
  compact arrays: false
  spec version: json-ld-1.1

t0092
type: PositiveEvaluationTest
type: CompactTest
name: Compact input with [@graph, @set] container to output without [@graph, @set] container
purpose: Ensure @graph appears properly in output
input: compact/0092-in.jsonld
context: compact/0092-context.jsonld
expect: compact/0092-out.jsonld
option:
  spec version: json-ld-1.1

t0093
type: PositiveEvaluationTest
type: CompactTest
name: Compact input with [@graph, @set] container to output without [@graph, @set] container with compactArrays unset
purpose: Ensure @graph appears properly in output with compactArrays unset
input: compact/0093-in.jsonld
context: compact/0093-context.jsonld
expect: compact/0093-out.jsonld
option:
  compact arrays: false
  spec version: json-ld-1.1

t0094
type: PositiveEvaluationTest
type: CompactTest
name: Compact input with [@graph, @set] container to output without [@graph, @set] container
purpose: Ensure @graph appears properly in output
input: compact/0094-in.jsonld
context: compact/0094-context.jsonld
expect: compact/0094-out.jsonld
option:
  spec version: json-ld-1.1

t0095
type: PositiveEvaluationTest
type: CompactTest
name: Relative propererty IRIs with @vocab: ''
purpose: Complex use cases for relative IRI compaction or properties
input: compact/0095-in.jsonld
context: compact/0095-context.jsonld
expect: compact/0095-out.jsonld

t0096
type: PositiveEvaluationTest
type: CompactTest
name: Compact @graph container (multiple graphs)
purpose: Ensure @graph appears properly in output
input: compact/0096-in.jsonld
context: compact/0096-context.jsonld
expect: compact/0096-out.jsonld
option:
  spec version: json-ld-1.1

t0097
type: PositiveEvaluationTest
type: CompactTest
name: Compact [@graph, @set] container (multiple graphs)
purpose: Ensure @graph appears properly in output
input: compact/0097-in.jsonld
context: compact/0097-context.jsonld
expect: compact/0097-out.jsonld
option:
  spec version: json-ld-1.1

t0098
type: PositiveEvaluationTest
type: CompactTest
name: Compact [@graph, @index] container (multiple indexed objects)
purpose: Ensure @graph appears properly in output
input: compact/0098-in.jsonld
context: compact/0098-context.jsonld
expect: compact/0098-out.jsonld
option:
  spec version: json-ld-1.1

t0099
type: PositiveEvaluationTest
type: CompactTest
name: Compact [@graph, @index, @set] container (multiple indexed objects)
purpose: Ensure @graph appears properly in output
input: compact/0099-in.jsonld
context: compact/0099-context.jsonld
expect: compact/0099-out.jsonld
option:
  spec version: json-ld-1.1

t0100
type: PositiveEvaluationTest
type: CompactTest
name: Compact [@graph, @id] container (multiple indexed objects)
purpose: Ensure @graph appears properly in output
input: compact/0100-in.jsonld
context: compact/0100-context.jsonld
expect: compact/0100-out.jsonld
option:
  spec version: json-ld-1.1

t0101
type: PositiveEvaluationTest
type: CompactTest
name: Compact [@graph, @id, @set] container (multiple indexed objects)
purpose: Ensure @graph appears properly in output
input: compact/0101-in.jsonld
context: compact/0101-context.jsonld
expect: compact/0101-out.jsonld
option:
  spec version: json-ld-1.1

t0102
type: PositiveEvaluationTest
type: CompactTest
name: Compact [@graph, @index] container (multiple indexes and objects)
purpose: Ensure @graph appears properly in output
input: compact/0102-in.jsonld
context: compact/0102-context.jsonld
expect: compact/0102-out.jsonld
option:
  spec version: json-ld-1.1

t0103
type: PositiveEvaluationTest
type: CompactTest
name: Compact [@graph, @id] container (multiple ids and objects)
purpose: Ensure @graph appears properly in output
input: compact/0103-in.jsonld
context: compact/0103-context.jsonld
expect: compact/0103-out.jsonld
option:
  spec version: json-ld-1.1

t0104
type: PositiveEvaluationTest
type: CompactTest
name: Compact @type with @container: @set
purpose: Ensures that a single @type value is represented as an array
input: compact/0104-in.jsonld
context: compact/0104-context.jsonld
expect: compact/0104-out.jsonld
option:
  spec version: json-ld-1.1

t0105
type: PositiveEvaluationTest
type: CompactTest
name: Compact @type with @container: @set using an alias of @type
purpose: Ensures that a single @type value is represented as an array
input: compact/0105-in.jsonld
context: compact/0105-context.jsonld
expect: compact/0105-out.jsonld
option:
  spec version: json-ld-1.1

t0106
type: PositiveEvaluationTest
type: CompactTest
name: Do not compact @type with @container: @set to an array using an alias of @type
purpose: Ensures that a single @type value is not represented as an array in 1.0
input: compact/0106-in.jsonld
context: compact/0106-context.jsonld
expect: compact/0106-out.jsonld
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1

t0107
type: PositiveEvaluationTest
type: CompactTest
name: Relative propererty IRIs with @vocab: ''
purpose: Complex use cases for relative IRI compaction or properties
input: compact/0107-in.jsonld
context: compact/0107-context.jsonld
expect: compact/0107-out.jsonld

t0108
type: PositiveEvaluationTest
type: CompactTest
name: context with JavaScript Object property names
purpose: Compact with context including JavaScript Object property names
input: compact/0108-in.jsonld
context: compact/0108-context.jsonld
expect: compact/0108-out.jsonld

t0109
type: PositiveEvaluationTest
type: CompactTest
name: Compact @graph container (multiple objects)
purpose: Multiple objects in a simple graph with a graph container need to use @included
input: compact/0109-in.jsonld
context: compact/0109-context.jsonld
expect: compact/0109-out.jsonld
option:
  spec version: json-ld-1.1

t0110
type: PositiveEvaluationTest
type: CompactTest
name: Compact [@graph, @set] container (multiple objects)
purpose: Multiple objects in a simple graph with a graph container need to use @included
input: compact/0110-in.jsonld
context: compact/0110-context.jsonld
expect: compact/0110-out.jsonld
option:
  spec version: json-ld-1.1

t0111
type: PositiveEvaluationTest
type: CompactTest
name: Keyword-like relative IRIs
purpose: Relative IRIs must not have the form a of keyword
input: compact/0111-in.jsonld
context: compact/0111-context.jsonld
expect: compact/0111-out.jsonld
option:
  spec version: json-ld-1.1

t0113
type: PositiveEvaluationTest
type: CompactTest
name: Compact property index using Absolute IRI index
purpose: With @container: @index and @index an absolute IRI, ensure round-tripping of compacted representation
input: compact/0113-in.jsonld
context: compact/0113-context.jsonld
expect: compact/0113-out.jsonld

t0112
type: PositiveEvaluationTest
type: CompactTest
name: Compact property index using Compact IRI index
purpose: With @container: @index and @index a compact IRI, ensure round-tripping of compacted representation
input: compact/0112-in.jsonld
context: compact/0112-context.jsonld
expect: compact/0112-out.jsonld

tc001
type: PositiveEvaluationTest
type: CompactTest
name: adding new term
purpose: Compaction using a scoped context uses term scope for selecting proper term
input: compact/c001-in.jsonld
context: compact/c001-context.jsonld
expect: compact/c001-out.jsonld
option:
  spec version: json-ld-1.1

tc002
type: PositiveEvaluationTest
type: CompactTest
name: overriding a term
purpose: Compaction using a scoped context uses term scope for selecting proper term
input: compact/c002-in.jsonld
context: compact/c002-context.jsonld
expect: compact/c002-out.jsonld
option:
  spec version: json-ld-1.1

tc003
type: PositiveEvaluationTest
type: CompactTest
name: property and value with different terms mapping to the same expanded property
purpose: Compaction using a scoped context uses term scope for selecting proper term
input: compact/c003-in.jsonld
context: compact/c003-context.jsonld
expect: compact/c003-out.jsonld
option:
  spec version: json-ld-1.1

tc004
type: PositiveEvaluationTest
type: CompactTest
name: deep @context affects nested nodes
purpose: Compaction using a scoped context uses term scope for selecting proper term
input: compact/c004-in.jsonld
context: compact/c004-context.jsonld
expect: compact/c004-out.jsonld
option:
  spec version: json-ld-1.1

tc005
type: PositiveEvaluationTest
type: CompactTest
name: scoped context layers on intemediate contexts
purpose: Compaction using a scoped context uses term scope for selecting proper term
input: compact/c005-in.jsonld
context: compact/c005-context.jsonld
expect: compact/c005-out.jsonld
option:
  spec version: json-ld-1.1

tc006
type: PositiveEvaluationTest
type: CompactTest
name: adding new term
purpose: scoped context on @type
input: compact/c006-in.jsonld
context: compact/c006-context.jsonld
expect: compact/c006-out.jsonld
option:
  spec version: json-ld-1.1

tc007
type: PositiveEvaluationTest
type: CompactTest
name: overriding a term
purpose: scoped context on @type
input: compact/c007-in.jsonld
context: compact/c007-context.jsonld
expect: compact/c007-out.jsonld
option:
  spec version: json-ld-1.1

tc008
type: PositiveEvaluationTest
type: CompactTest
name: alias of @type
purpose: scoped context on @type
input: compact/c008-in.jsonld
context: compact/c008-context.jsonld
expect: compact/c008-out.jsonld
option:
  spec version: json-ld-1.1

tc009
type: PositiveEvaluationTest
type: CompactTest
name: deep @type-scoped @context does NOT affect nested nodes
purpose: scoped context on @type
input: compact/c009-in.jsonld
context: compact/c009-context.jsonld
expect: compact/c009-out.jsonld
option:
  spec version: json-ld-1.1

tc010
type: PositiveEvaluationTest
type: CompactTest
name: scoped context layers on intemediate contexts
purpose: scoped context on @type
input: compact/c010-in.jsonld
context: compact/c010-context.jsonld
expect: compact/c010-out.jsonld
option:
  spec version: json-ld-1.1

tc011
type: PositiveEvaluationTest
type: CompactTest
name: applies context for all values
purpose: scoped context on @type
input: compact/c011-in.jsonld
context: compact/c011-context.jsonld
expect: compact/c011-out.jsonld
option:
  spec version: json-ld-1.1

tc012
type: PositiveEvaluationTest
type: CompactTest
name: orders @type terms when applying scoped contexts
purpose: scoped context on @type
input: compact/c012-in.jsonld
context: compact/c012-context.jsonld
expect: compact/c012-out.jsonld
option:
  spec version: json-ld-1.1

tc013
type: PositiveEvaluationTest
type: CompactTest
name: deep property-term scoped @context in @type-scoped @context affects nested nodes
purpose: scoped context on @type
input: compact/c013-in.jsonld
context: compact/c013-context.jsonld
expect: compact/c013-out.jsonld
option:
  spec version: json-ld-1.1

tc014
type: PositiveEvaluationTest
type: CompactTest
name: type-scoped context nullification
purpose: Nullifying a type-scoped context continues to use the previous context when compacting @type.
input: compact/c014-in.jsonld
context: compact/c014-context.jsonld
expect: compact/c014-out.jsonld
option:
  spec version: json-ld-1.1

tc015
type: PositiveEvaluationTest
type: CompactTest
name: type-scoped base
purpose: type-scoped base
input: compact/c015-in.jsonld
context: compact/c015-context.jsonld
expect: compact/c015-out.jsonld
option:
  spec version: json-ld-1.1

tc016
type: PositiveEvaluationTest
type: CompactTest
name: type-scoped vocab
purpose: type-scoped vocab
input: compact/c016-in.jsonld
context: compact/c016-context.jsonld
expect: compact/c016-out.jsonld
option:
  spec version: json-ld-1.1

tc017
type: PositiveEvaluationTest
type: CompactTest
name: multiple type-scoped contexts are properly reverted
purpose: multiple type-scoped contexts are property reverted
input: compact/c017-in.jsonld
context: compact/c017-context.jsonld
expect: compact/c017-out.jsonld
option:
  spec version: json-ld-1.1

tc018
type: PositiveEvaluationTest
type: CompactTest
name: multiple type-scoped types resolved against previous context
purpose: multiple type-scoped types resolved against previous context
input: compact/c018-in.jsonld
context: compact/c018-context.jsonld
expect: compact/c018-out.jsonld
option:
  spec version: json-ld-1.1

tc019
type: PositiveEvaluationTest
type: CompactTest
name: type-scoped context with multiple property scoped terms
purpose: type-scoped context with multiple property scoped terms
input: compact/c019-in.jsonld
context: compact/c019-context.jsonld
expect: compact/c019-out.jsonld
option:
  spec version: json-ld-1.1

tc020
type: PositiveEvaluationTest
type: CompactTest
name: type-scoped value
purpose: type-scoped value
input: compact/c020-in.jsonld
context: compact/c020-context.jsonld
expect: compact/c020-out.jsonld
option:
  spec version: json-ld-1.1

tc021
type: PositiveEvaluationTest
type: CompactTest
name: type-scoped value mix
purpose: type-scoped value mix
input: compact/c021-in.jsonld
context: compact/c021-context.jsonld
expect: compact/c021-out.jsonld
option:
  spec version: json-ld-1.1

tc022
type: PositiveEvaluationTest
type: CompactTest
name: type-scoped property-scoped contexts including @type:@vocab
purpose: type-scoped property-scoped contexts including @type:@vocab
input: compact/c022-in.jsonld
context: compact/c022-context.jsonld
expect: compact/c022-out.jsonld
option:
  spec version: json-ld-1.1

tc023
type: PositiveEvaluationTest
type: CompactTest
name: composed type-scoped property-scoped contexts including @type:@vocab
purpose: composed type-scoped property-scoped contexts including @type:@vocab
input: compact/c023-in.jsonld
context: compact/c023-context.jsonld
expect: compact/c023-out.jsonld
option:
  spec version: json-ld-1.1

tc024
type: PositiveEvaluationTest
type: CompactTest
name: type-scoped + property-scoped + values evaluates against previous context
purpose: type-scoped + property-scoped + values evaluates against previous context
input: compact/c024-in.jsonld
context: compact/c024-context.jsonld
expect: compact/c024-out.jsonld
option:
  spec version: json-ld-1.1

tc025
type: PositiveEvaluationTest
type: CompactTest
name: type-scoped + graph container
purpose: type-scoped + graph container
input: compact/c025-in.jsonld
context: compact/c025-context.jsonld
expect: compact/c025-out.jsonld
option:
  spec version: json-ld-1.1

tc026
type: PositiveEvaluationTest
type: CompactTest
name: @propagate: true on type-scoped context
purpose: type-scoped context with @propagate: true survive node-objects
input: compact/c026-in.jsonld
context: compact/c026-context.jsonld
expect: compact/c026-out.jsonld
option:
  spec version: json-ld-1.1

tc027
type: PositiveEvaluationTest
type: CompactTest
name: @propagate: false on property-scoped context
purpose: property-scoped context with @propagate: false do not survive node-objects
input: compact/c027-in.jsonld
context: compact/c027-context.jsonld
expect: compact/c027-out.jsonld
option:
  spec version: json-ld-1.1

tc028
type: PositiveEvaluationTest
type: CompactTest
name: Empty-property scoped context does not affect term selection.
purpose: Adding a minimal/empty property-scoped context should not affect the using terms defined in outer context.
input: compact/c028-in.jsonld
context: compact/c028-context.jsonld
expect: compact/c028-out.jsonld
option:
  spec version: json-ld-1.1

tdi01
type: PositiveEvaluationTest
type: CompactTest
name: term direction null
purpose: Uses term with null direction when two terms conflict on direction.
option:
  spec version: json-ld-1.1
input: compact/di01-in.jsonld
context: compact/di01-context.jsonld
expect: compact/di01-out.jsonld

tdi02
type: PositiveEvaluationTest
type: CompactTest
name: use alias of @direction
purpose: Use alias of @direction.
option:
  spec version: json-ld-1.1
input: compact/di02-in.jsonld
context: compact/di02-context.jsonld
expect: compact/di02-out.jsonld

tdi03
type: PositiveEvaluationTest
type: CompactTest
name: term selection with lists and direction
purpose: Term selection includes values of @list.
option:
  spec version: json-ld-1.1
input: compact/di03-in.jsonld
context: compact/di03-context.jsonld
expect: compact/di03-out.jsonld

tdi04
type: PositiveEvaluationTest
type: CompactTest
name: simple language map with term direction
purpose: Term selection with language maps and @direction.
option:
  spec version: json-ld-1.1
input: compact/di04-in.jsonld
context: compact/di04-context.jsonld
expect: compact/di04-out.jsonld

tdi05
type: PositiveEvaluationTest
type: CompactTest
name: simple language map with overriding term direction
purpose: Term selection with language maps and @direction.
option:
  spec version: json-ld-1.1
input: compact/di05-in.jsonld
context: compact/di05-context.jsonld
expect: compact/di05-out.jsonld

tdi06
type: PositiveEvaluationTest
type: CompactTest
name: simple language map with overriding null direction
purpose: Term selection with language maps and @direction.
option:
  spec version: json-ld-1.1
input: compact/di06-in.jsonld
context: compact/di06-context.jsonld
expect: compact/di06-out.jsonld

tdi07
type: PositiveEvaluationTest
type: CompactTest
name: simple language map with mismatching term direction
purpose: Term selection with language maps and @direction.
option:
  spec version: json-ld-1.1
input: compact/di07-in.jsonld
context: compact/di07-context.jsonld
expect: compact/di07-out.jsonld

te001
type: NegativeEvaluationTest
type: CompactTest
name: Compaction to list of lists
purpose: Verifies that an exception is raised in Compaction when attempting to compact a list of lists
option:
  spec version: json-ld-1.0
input: compact/e001-in.jsonld
context: compact/e001-context.jsonld
expect error code: compaction to list of lists

te002
type: NegativeEvaluationTest
type: CompactTest
name: Absolute IRI confused with Compact IRI
purpose: Verifies that IRI compaction detects when the result is an absolute IRI with a scheme matching a term.
option:
  spec version: json-ld-1.1
input: compact/e002-in.jsonld
context: compact/e002-context.jsonld
expect error code: IRI confused with prefix

ten01
type: NegativeEvaluationTest
type: CompactTest
name: Nest term not defined
purpose: Transparent Nesting
input: compact/en01-in.jsonld
context: compact/en01-context.jsonld
expect error code: invalid @nest value
option:
  spec version: json-ld-1.1

tep05
type: NegativeEvaluationTest
type: CompactTest
name: processingMode json-ld-1.0 conflicts with @version: 1.1
purpose: If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.
input: compact/ep05-in.jsonld
context: compact/ep05-context.jsonld
expect error code: processing mode conflict
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1

tep06
type: NegativeEvaluationTest
type: CompactTest
name: @version must be 1.1
purpose: If @version is specified, it must be 1.1
option:
  spec version: json-ld-1.1
input: compact/ep06-in.jsonld
context: compact/ep06-context.jsonld
expect error code: invalid @version value

tep07
type: NegativeEvaluationTest
type: CompactTest
name: @prefix is not allowed in 1.0
purpose: @prefix is not allowed in a term definition 1.0
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1
input: compact/ep07-in.jsonld
context: compact/ep07-context.jsonld
expect error code: invalid term definition

tep08
type: NegativeEvaluationTest
type: CompactTest
name: @prefix must be a boolean
purpose: @prefix must be a boolean in a term definition in 1.1
option:
  spec version: json-ld-1.1
input: compact/ep08-in.jsonld
context: compact/ep08-context.jsonld
expect error code: invalid @prefix value

tep09
type: NegativeEvaluationTest
type: CompactTest
name: @prefix not allowed on compact IRI term
purpose: If processingMode is json-ld-1.0, or if term contains a colon (:), an invalid term definition has been detected and processing is aborted.
option:
  spec version: json-ld-1.1
input: compact/ep09-in.jsonld
context: compact/ep09-context.jsonld
expect error code: invalid term definition

tep10
type: NegativeEvaluationTest
type: CompactTest
name: @nest is not allowed in 1.0
purpose: @nest is not allowed in a term definitionin 1.0
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1
input: compact/ep10-in.jsonld
context: compact/ep10-context.jsonld
expect error code: invalid term definition

tep11
type: NegativeEvaluationTest
type: CompactTest
name: @context is not allowed in 1.0
purpose: @context is not allowed in a term definitionin 1.0
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1
input: compact/ep11-in.jsonld
context: compact/ep11-context.jsonld
expect error code: invalid term definition

tep12
type: NegativeEvaluationTest
type: CompactTest
name: @container may not be an array in 1.0
purpose: validate appropriate values of @container
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1
input: compact/ep12-in.jsonld
context: compact/ep12-context.jsonld
expect error code: invalid container mapping

tep13
type: NegativeEvaluationTest
type: CompactTest
name: @container may not be @id in 1.0
purpose: validate appropriate values of @container
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1
input: compact/ep13-in.jsonld
context: compact/ep13-context.jsonld
expect error code: invalid container mapping

tep14
type: NegativeEvaluationTest
type: CompactTest
name: @container may not be @type in 1.0
purpose: validate appropriate values of @container
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1
input: compact/ep14-in.jsonld
context: compact/ep14-context.jsonld
expect error code: invalid container mapping

tep15
type: NegativeEvaluationTest
type: CompactTest
name: @container may not be @graph in 1.0
purpose: validate appropriate values of @container
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1
input: compact/ep15-in.jsonld
context: compact/ep15-context.jsonld
expect error code: invalid container mapping

tin01
type: PositiveEvaluationTest
type: CompactTest
name: Basic Included array
purpose: Tests included blocks.
input: compact/in01-in.jsonld
context: compact/in01-context.jsonld
expect: compact/in01-out.jsonld
option:
  spec version: json-ld-1.1

tin02
type: PositiveEvaluationTest
type: CompactTest
name: Basic Included object
purpose: Tests included blocks.
input: compact/in02-in.jsonld
context: compact/in02-context.jsonld
expect: compact/in02-out.jsonld
option:
  spec version: json-ld-1.1

tin03
type: PositiveEvaluationTest
type: CompactTest
name: Multiple properties mapping to @included are folded together
purpose: Tests included blocks.
input: compact/in03-in.jsonld
context: compact/in03-context.jsonld
expect: compact/in03-out.jsonld
option:
  spec version: json-ld-1.1

tin04
type: PositiveEvaluationTest
type: CompactTest
name: Included containing @included
purpose: Tests included blocks.
input: compact/in04-in.jsonld
context: compact/in04-context.jsonld
expect: compact/in04-out.jsonld
option:
  spec version: json-ld-1.1

tin05
type: PositiveEvaluationTest
type: CompactTest
name: Property value with @included
purpose: Tests included blocks.
input: compact/in05-in.jsonld
context: compact/in05-context.jsonld
expect: compact/in05-out.jsonld
option:
  spec version: json-ld-1.1

tjs01
type: PositiveEvaluationTest
type: CompactTest
name: Compact JSON literal (boolean true)
purpose: Tests compacting property with @type @json to a JSON literal (boolean true).
input: compact/js01-in.jsonld
context: compact/js01-context.jsonld
expect: compact/js01-out.jsonld
option:
  spec version: json-ld-1.1

tjs02
type: PositiveEvaluationTest
type: CompactTest
name: Compact JSON literal (boolean false)
purpose: Tests compacting property with @type @json to a JSON literal (boolean false).
input: compact/js02-in.jsonld
context: compact/js02-context.jsonld
expect: compact/js02-out.jsonld
option:
  spec version: json-ld-1.1

tjs03
type: PositiveEvaluationTest
type: CompactTest
name: Compact JSON literal (double)
purpose: Tests compacting property with @type @json to a JSON literal (double).
input: compact/js03-in.jsonld
context: compact/js03-context.jsonld
expect: compact/js03-out.jsonld
option:
  spec version: json-ld-1.1

tjs04
type: PositiveEvaluationTest
type: CompactTest
name: Compact JSON literal (double-zero)
purpose: Tests compacting property with @type @json to a JSON literal (double-zero).
input: compact/js04-in.jsonld
context: compact/js04-context.jsonld
expect: compact/js04-out.jsonld
option:
  spec version: json-ld-1.1

tjs05
type: PositiveEvaluationTest
type: CompactTest
name: Compact JSON literal (integer)
purpose: Tests compacting property with @type @json to a JSON literal (integer).
input: compact/js05-in.jsonld
context: compact/js05-context.jsonld
expect: compact/js05-out.jsonld
option:
  spec version: json-ld-1.1

tjs06
type: PositiveEvaluationTest
type: CompactTest
name: Compact JSON literal (object)
purpose: Tests compacting property with @type @json to a JSON literal (object).
input: compact/js06-in.jsonld
context: compact/js06-context.jsonld
expect: compact/js06-out.jsonld
option:
  spec version: json-ld-1.1

tjs07
type: PositiveEvaluationTest
type: CompactTest
name: Compact JSON literal (array)
purpose: Tests compacting property with @type @json to a JSON literal (array).
input: compact/js07-in.jsonld
context: compact/js07-context.jsonld
expect: compact/js07-out.jsonld
option:
  spec version: json-ld-1.1

tjs08
type: PositiveEvaluationTest
type: CompactTest
name: Compact already expanded JSON literal
purpose: Tests compacting JSON literal does not expand terms inside json.
input: compact/js08-in.jsonld
context: compact/js08-context.jsonld
expect: compact/js08-out.jsonld
option:
  spec version: json-ld-1.1

tjs09
type: PositiveEvaluationTest
type: CompactTest
name: Compact already expanded JSON literal with aliased keys
purpose: Tests compacting JSON literal in expanded form.
input: compact/js09-in.jsonld
context: compact/js09-context.jsonld
expect: compact/js09-out.jsonld
option:
  spec version: json-ld-1.1

tjs10
type: PositiveEvaluationTest
type: CompactTest
name: Compact JSON literal (string)
purpose: Tests compacting property with @type @json to a JSON literal (string).
input: compact/js10-in.jsonld
context: compact/js10-context.jsonld
expect: compact/js10-out.jsonld
option:
  spec version: json-ld-1.1

tjs11
type: PositiveEvaluationTest
type: CompactTest
name: Compact JSON literal (null)
purpose: Tests compacting property with @type @json to a JSON literal (null).
input: compact/js11-in.jsonld
context: compact/js11-context.jsonld
expect: compact/js11-out.jsonld
option:
  spec version: json-ld-1.1

tla01
type: PositiveEvaluationTest
type: CompactTest
name: most specific term matching in @list.
purpose: The most specific term that matches all of the elements in the list, taking into account the default language, must be selected, without considering case of language.
input: compact/la01-in.jsonld
context: compact/la01-context.jsonld
expect: compact/la01-out.jsonld

tli01
type: PositiveEvaluationTest
type: CompactTest
name: coerced @list containing an empty list
purpose: Lists of Lists
input: compact/li01-in.jsonld
context: compact/li01-context.jsonld
expect: compact/li01-out.jsonld
option:
  spec version: json-ld-1.1

tli02
type: PositiveEvaluationTest
type: CompactTest
name: coerced @list containing a list
purpose: Lists of Lists
input: compact/li02-in.jsonld
context: compact/li02-context.jsonld
expect: compact/li02-out.jsonld
option:
  spec version: json-ld-1.1

tli03
type: PositiveEvaluationTest
type: CompactTest
name: coerced @list containing an deep list
purpose: Lists of Lists
input: compact/li03-in.jsonld
context: compact/li03-context.jsonld
expect: compact/li03-out.jsonld
option:
  spec version: json-ld-1.1

tli04
type: PositiveEvaluationTest
type: CompactTest
name: coerced @list containing multiple lists
purpose: Lists of Lists
input: compact/li04-in.jsonld
context: compact/li04-context.jsonld
expect: compact/li04-out.jsonld
option:
  spec version: json-ld-1.1

tli05
type: PositiveEvaluationTest
type: CompactTest
name: coerced @list containing mixed list values
purpose: Lists of Lists
input: compact/li05-in.jsonld
context: compact/li05-context.jsonld
expect: compact/li05-out.jsonld
option:
  spec version: json-ld-1.1

tm001
type: PositiveEvaluationTest
type: CompactTest
name: Indexes to object not having an @id
purpose: Compaction using @container: @id
input: compact/m001-in.jsonld
context: compact/m001-context.jsonld
expect: compact/m001-out.jsonld
option:
  spec version: json-ld-1.1

tm002
type: PositiveEvaluationTest
type: CompactTest
name: Indexes to object already having an @id
purpose: Compaction using @container: @id
input: compact/m002-in.jsonld
context: compact/m002-context.jsonld
expect: compact/m002-out.jsonld
option:
  spec version: json-ld-1.1

tm003
type: PositiveEvaluationTest
type: CompactTest
name: Indexes to object not having an @type
purpose: Compaction using @container: @type
input: compact/m003-in.jsonld
context: compact/m003-context.jsonld
expect: compact/m003-out.jsonld
option:
  spec version: json-ld-1.1

tm004
type: PositiveEvaluationTest
type: CompactTest
name: Indexes to object already having an @type
purpose: Compaction using @container: @type
input: compact/m004-in.jsonld
context: compact/m004-context.jsonld
expect: compact/m004-out.jsonld
option:
  spec version: json-ld-1.1

tm005
type: PositiveEvaluationTest
type: CompactTest
name: Indexes to object using compact IRI @id
purpose: Compaction using @container: @id
input: compact/m005-in.jsonld
context: compact/m005-context.jsonld
expect: compact/m005-out.jsonld
option:
  spec version: json-ld-1.1

tm006
type: PositiveEvaluationTest
type: CompactTest
name: Indexes using compacted @type
purpose: Compaction using @container: @type
input: compact/m006-in.jsonld
context: compact/m006-context.jsonld
expect: compact/m006-out.jsonld
option:
  spec version: json-ld-1.1

tm007
type: PositiveEvaluationTest
type: CompactTest
name: When type is in a type map
purpose: scoped context on @type
input: compact/m007-in.jsonld
context: compact/m007-context.jsonld
expect: compact/m007-out.jsonld
option:
  spec version: json-ld-1.1

tm008
type: PositiveEvaluationTest
type: CompactTest
name: @index map with @none node definition
purpose: index on @index
input: compact/m008-in.jsonld
context: compact/m008-context.jsonld
expect: compact/m008-out.jsonld
option:
  spec version: json-ld-1.1

tm009
type: PositiveEvaluationTest
type: CompactTest
name: @index map with @none value
purpose: index on @index
input: compact/m009-in.jsonld
context: compact/m009-context.jsonld
expect: compact/m009-out.jsonld
option:
  spec version: json-ld-1.1

tm010
type: PositiveEvaluationTest
type: CompactTest
name: @index map with @none value using alias of @none
purpose: index on @index
input: compact/m010-in.jsonld
context: compact/m010-context.jsonld
expect: compact/m010-out.jsonld
option:
  spec version: json-ld-1.1

tm011
type: PositiveEvaluationTest
type: CompactTest
name: @language map with no @language
purpose: index on @language
input: compact/m011-in.jsonld
context: compact/m011-context.jsonld
expect: compact/m011-out.jsonld
option:
  spec version: json-ld-1.1

tm012
type: PositiveEvaluationTest
type: CompactTest
name: language map with no @language using alias of @none
purpose: index on @language
input: compact/m012-in.jsonld
context: compact/m012-context.jsonld
expect: compact/m012-out.jsonld
option:
  spec version: json-ld-1.1

tm013
type: PositiveEvaluationTest
type: CompactTest
name: id map using @none
purpose: index on @id
input: compact/m013-in.jsonld
context: compact/m013-context.jsonld
expect: compact/m013-out.jsonld
option:
  spec version: json-ld-1.1

tm014
type: PositiveEvaluationTest
type: CompactTest
name: id map using @none with alias
purpose: index on @id
input: compact/m014-in.jsonld
context: compact/m014-context.jsonld
expect: compact/m014-out.jsonld
option:
  spec version: json-ld-1.1

tm015
type: PositiveEvaluationTest
type: CompactTest
name: type map using @none with alias
purpose: index on @type
input: compact/m015-in.jsonld
context: compact/m015-context.jsonld
expect: compact/m015-out.jsonld
option:
  spec version: json-ld-1.1

tm016
type: PositiveEvaluationTest
type: CompactTest
name: type map using @none with alias
purpose: index on @type
input: compact/m016-in.jsonld
context: compact/m016-context.jsonld
expect: compact/m016-out.jsonld
option:
  spec version: json-ld-1.1

tm017
type: PositiveEvaluationTest
type: CompactTest
name: graph index map using @none
purpose: index on @graph and @index
input: compact/m017-in.jsonld
context: compact/m017-context.jsonld
expect: compact/m017-out.jsonld
option:
  spec version: json-ld-1.1

tm018
type: PositiveEvaluationTest
type: CompactTest
name: graph id map using @none
purpose: index on @graph and @id
input: compact/m018-in.jsonld
context: compact/m018-context.jsonld
expect: compact/m018-out.jsonld
option:
  spec version: json-ld-1.1

tm019
type: PositiveEvaluationTest
type: CompactTest
name: graph id map using alias of @none
purpose: index on @graph and @id
input: compact/m019-in.jsonld
context: compact/m019-context.jsonld
expect: compact/m019-out.jsonld
option:
  spec version: json-ld-1.1

tm020
type: PositiveEvaluationTest
type: CompactTest
name: node reference compacts to string value of type map
purpose: index on @type
input: compact/m020-in.jsonld
context: compact/m020-context.jsonld
expect: compact/m020-out.jsonld
option:
  spec version: json-ld-1.1

tm021
type: PositiveEvaluationTest
type: CompactTest
name: node reference compacts to string value of type map with @type: @id
purpose: index on @type
input: compact/m021-in.jsonld
context: compact/m021-context.jsonld
expect: compact/m021-out.jsonld
option:
  spec version: json-ld-1.1

tm022
type: PositiveEvaluationTest
type: CompactTest
name: node reference compacts to string value of type map with @type: @vocab
purpose: index on @type
input: compact/m022-in.jsonld
context: compact/m022-context.jsonld
expect: compact/m022-out.jsonld
option:
  spec version: json-ld-1.1

tn001
type: PositiveEvaluationTest
type: CompactTest
name: Indexes to @nest for property with @nest
purpose: Compaction using @nest
input: compact/n001-in.jsonld
context: compact/n001-context.jsonld
expect: compact/n001-out.jsonld
option:
  spec version: json-ld-1.1

tn002
type: PositiveEvaluationTest
type: CompactTest
name: Indexes to @nest for all properties with @nest
purpose: Compaction using @nest
input: compact/n002-in.jsonld
context: compact/n002-context.jsonld
expect: compact/n002-out.jsonld
option:
  spec version: json-ld-1.1

tn003
type: PositiveEvaluationTest
type: CompactTest
name: Nests using alias of @nest
purpose: Compaction using @nest
input: compact/n003-in.jsonld
context: compact/n003-context.jsonld
expect: compact/n003-out.jsonld
option:
  spec version: json-ld-1.1

tn004
type: PositiveEvaluationTest
type: CompactTest
name: Arrays of nested values
purpose: Compaction using @nest
input: compact/n004-in.jsonld
context: compact/n004-context.jsonld
expect: compact/n004-out.jsonld
option:
  spec version: json-ld-1.1

tn005
type: PositiveEvaluationTest
type: CompactTest
name: Nested @container: @list
purpose: Compaction using @nest
input: compact/n005-in.jsonld
context: compact/n005-context.jsonld
expect: compact/n005-out.jsonld
option:
  spec version: json-ld-1.1

tn006
type: PositiveEvaluationTest
type: CompactTest
name: Nested @container: @index
purpose: Compaction using @nest
input: compact/n006-in.jsonld
context: compact/n006-context.jsonld
expect: compact/n006-out.jsonld
option:
  spec version: json-ld-1.1

tn007
type: PositiveEvaluationTest
type: CompactTest
name: Nested @container: @language
purpose: Compaction using @nest
input: compact/n007-in.jsonld
context: compact/n007-context.jsonld
expect: compact/n007-out.jsonld
option:
  spec version: json-ld-1.1

tn008
type: PositiveEvaluationTest
type: CompactTest
name: Nested @container: @type
purpose: Compaction using @nest
input: compact/n008-in.jsonld
context: compact/n008-context.jsonld
expect: compact/n008-out.jsonld
option:
  spec version: json-ld-1.1

tn009
type: PositiveEvaluationTest
type: CompactTest
name: Nested @container: @id
purpose: Compaction using @nest
input: compact/n009-in.jsonld
context: compact/n009-context.jsonld
expect: compact/n009-out.jsonld
option:
  spec version: json-ld-1.1

tn010
type: PositiveEvaluationTest
type: CompactTest
name: Multiple nest aliases
purpose: Compaction using @nest
input: compact/n010-in.jsonld
context: compact/n010-context.jsonld
expect: compact/n010-out.jsonld
option:
  spec version: json-ld-1.1

tn011
type: PositiveEvaluationTest
type: CompactTest
name: Nests using alias of @nest (defined with @id)
purpose: Compaction using @nest
input: compact/n011-in.jsonld
context: compact/n011-context.jsonld
expect: compact/n011-out.jsonld
option:
  spec version: json-ld-1.1

tp001
type: PositiveEvaluationTest
type: CompactTest
name: Compact IRI will not use an expanded term definition in 1.0
purpose: Terms with an expanded term definition are not used for creating compact IRIs
option:
  processing mode: json-ld-1.0
  spec version: json-ld-1.1
input: compact/p001-in.jsonld
context: compact/p001-context.jsonld
expect: compact/p001-out.jsonld

tp002
type: PositiveEvaluationTest
type: CompactTest
name: Compact IRI does not use expanded term definition in 1.1
purpose: Terms with an expanded term definition are not used for creating compact IRIs
option:
  spec version: json-ld-1.1
input: compact/p002-in.jsonld
context: compact/p002-context.jsonld
expect: compact/p002-out.jsonld

tp003
type: PositiveEvaluationTest
type: CompactTest
name: Compact IRI does not use simple term that does not end with a gen-delim
purpose: Terms not ending with a gen-delim are not used for creating compact IRIs
option:
  spec version: json-ld-1.1
input: compact/p003-in.jsonld
context: compact/p003-context.jsonld
expect: compact/p003-out.jsonld

tp004
type: PositiveEvaluationTest
type: CompactTest
name: Compact IRIs using simple terms ending with gen-delim
purpose: All simple terms ending with gen-delim are suitable for compaction
option:
  spec version: json-ld-1.1
input: compact/p004-in.jsonld
context: compact/p004-context.jsonld
expect: compact/p004-out.jsonld

tp005
type: PositiveEvaluationTest
type: CompactTest
name: Compact IRI uses term with definition including @prefix: true
purpose: Expanded term definition may set prefix explicitly in 1.1
option:
  spec version: json-ld-1.1
input: compact/p005-in.jsonld
context: compact/p005-context.jsonld
expect: compact/p005-out.jsonld

tp006
type: PositiveEvaluationTest
type: CompactTest
name: Compact IRI uses term with definition including @prefix: true
purpose: Expanded term definition may set prefix explicitly in 1.1
option:
  spec version: json-ld-1.1
input: compact/p006-in.jsonld
context: compact/p006-context.jsonld
expect: compact/p006-out.jsonld

tp007
type: PositiveEvaluationTest
type: CompactTest
name: Compact IRI not used as prefix
purpose: Terms including a colon are excluded from being used as a prefix
option:
  spec version: json-ld-1.1
input: compact/p007-in.jsonld
context: compact/p007-context.jsonld
expect: compact/p007-out.jsonld

tp008
type: PositiveEvaluationTest
type: CompactTest
name: Compact IRI does not use term with definition including @prefix: false
purpose: Expanded term definition may set prefix explicitly in 1.1
option:
  spec version: json-ld-1.1
input: compact/p008-in.jsonld
context: compact/p008-context.jsonld
expect: compact/p008-out.jsonld

tpi01
type: PositiveEvaluationTest
type: CompactTest
name: property-valued index indexes property value, instead of property (value)
purpose: Compacting property-valued indexes.
option:
  spec version: json-ld-1.1
input: compact/pi01-in.jsonld
context: compact/pi01-context.jsonld
expect: compact/pi01-out.jsonld

tpi02
type: PositiveEvaluationTest
type: CompactTest
name: property-valued index indexes property value, instead of property (multiple values)
purpose: Compacting property-valued indexes.
option:
  spec version: json-ld-1.1
input: compact/pi02-in.jsonld
context: compact/pi02-context.jsonld
expect: compact/pi02-out.jsonld

tpi03
type: PositiveEvaluationTest
type: CompactTest
name: property-valued index indexes property value, instead of property (node)
purpose: Compacting property-valued indexes.
option:
  spec version: json-ld-1.1
input: compact/pi03-in.jsonld
context: compact/pi03-context.jsonld
expect: compact/pi03-out.jsonld

tpi04
type: PositiveEvaluationTest
type: CompactTest
name: property-valued index indexes property value, instead of property (multiple nodes)
purpose: Compacting property-valued indexes.
option:
  spec version: json-ld-1.1
input: compact/pi04-in.jsonld
context: compact/pi04-context.jsonld
expect: compact/pi04-out.jsonld

tpi05
type: PositiveEvaluationTest
type: CompactTest
name: property-valued index indexes using @none if no property value exists
purpose: Compacting property-valued indexes.
option:
  spec version: json-ld-1.1
input: compact/pi05-in.jsonld
context: compact/pi05-context.jsonld
expect: compact/pi05-out.jsonld

tpi06
type: PositiveEvaluationTest
type: CompactTest
name: property-valued index indexes using @none if no property value does not compact to string
purpose: Compacting property-valued indexes.
option:
  spec version: json-ld-1.1
input: compact/pi06-in.jsonld
context: compact/pi06-context.jsonld
expect: compact/pi06-out.jsonld

tpr01
type: NegativeEvaluationTest
type: CompactTest
name: Check illegal clearing of context with protected terms
purpose: Check error when clearing a context with protected terms.
option:
  spec version: json-ld-1.1
input: compact/pr01-in.jsonld
context: compact/pr01-context.jsonld
expect error code: invalid context nullification

tpr02
type: NegativeEvaluationTest
type: CompactTest
name: Check illegal overriding of protected term
purpose: Check error when overriding a protected term.
option:
  spec version: json-ld-1.1
input: compact/pr02-in.jsonld
context: compact/pr02-context.jsonld
expect error code: protected term redefinition

tpr03
type: NegativeEvaluationTest
type: CompactTest
name: Check illegal overriding of protected term from type-scoped context
purpose: Check error when overriding a protected term from type-scoped context.
option:
  spec version: json-ld-1.1
input: compact/pr03-in.jsonld
context: compact/pr03-context.jsonld
expect error code: protected term redefinition

tpr04
type: PositiveEvaluationTest
type: CompactTest
name: Check legal overriding of protected term from property-scoped context
purpose: Check overriding a protected term from property-scoped context.
option:
  spec version: json-ld-1.1
input: compact/pr04-in.jsonld
context: compact/pr04-context.jsonld
expect: compact/pr04-out.jsonld

tpr05
type: PositiveEvaluationTest
type: CompactTest
name: Check legal overriding of type-scoped protected term from nested node
purpose: Check legal overriding of type-scoped protected term from nested node.
option:
  spec version: json-ld-1.1
input: compact/pr05-in.jsonld
context: compact/pr05-context.jsonld
expect: compact/pr05-out.jsonld

tr001
type: PositiveEvaluationTest
type: CompactTest
name: Expands and compacts to document base by default
purpose: Compact IRI attempts to compact document-relative IRIs
input: compact/r001-in.jsonld
context: compact/r001-context.jsonld
expect: compact/r001-out.jsonld
option:
  base: http://example.org/
  spec version: json-ld-1.1

tr002
type: PositiveEvaluationTest
type: CompactTest
name: Expands and does not compact to document base with compactToRelative false
purpose: With compactToRelative option set to false, IRIs which could be made relative to the document base are not made relative.
input: compact/r002-in.jsonld
context: compact/r002-context.jsonld
expect: compact/r002-out.jsonld
option:
  spec version: json-ld-1.1
  compact to relative: false

ts001
type: PositiveEvaluationTest
type: CompactTest
name: @context with single array values
purpose: @context values may be in an array
input: compact/s001-in.jsonld
context: compact/s001-context.jsonld
expect: compact/s001-out.jsonld
option:
  spec version: json-ld-1.1

ts002
type: PositiveEvaluationTest
type: CompactTest
name: @context with array including @set uses array values
purpose: @context values may include @set along with another compatible value
input: compact/s002-in.jsonld
context: compact/s002-context.jsonld
expect: compact/s002-out.jsonld
option:
  spec version: json-ld-1.1

ttn01
type: PositiveEvaluationTest
type: CompactTest
name: @type: @none does not compact values
purpose: @type: @none does not compact values.
option:
  spec version: json-ld-1.1
context: compact/tn01-context.jsonld
input: compact/tn01-in.jsonld
expect: compact/tn01-out.jsonld

ttn02
type: PositiveEvaluationTest
type: CompactTest
name: @type: @none does not use arrays by default
purpose: @type: @none honors @container.
option:
  spec version: json-ld-1.1
context: compact/tn02-context.jsonld
input: compact/tn02-in.jsonld
expect: compact/tn02-out.jsonld

ttn03
type: PositiveEvaluationTest
type: CompactTest
name: @type: @none uses arrays with @container: @set
purpose: @type: @none honors @container.
option:
  spec version: json-ld-1.1
context: compact/tn03-context.jsonld
input: compact/tn03-in.jsonld
expect: compact/tn03-out.jsonld