From 4e3522841ff89a2c291df0de9b1490d959272197 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Tue, 22 Oct 2019 15:43:06 +0200 Subject: [PATCH 1/2] Fix error codes in tests being emitted as IRIs --- tests/compact-manifest.jsonld | 34 +++--- tests/context.jsonld | 15 +-- tests/expand-manifest.jsonld | 196 +++++++++++++++---------------- tests/flatten-manifest.jsonld | 2 +- tests/fromRdf-manifest.jsonld | 4 +- tests/html-manifest.jsonld | 28 ++--- tests/remote-doc-manifest.jsonld | 6 +- tests/toRdf-manifest.jsonld | 68 +++++------ 8 files changed, 177 insertions(+), 176 deletions(-) diff --git a/tests/compact-manifest.jsonld b/tests/compact-manifest.jsonld index 8046426e..2f22ba3c 100644 --- a/tests/compact-manifest.jsonld +++ b/tests/compact-manifest.jsonld @@ -1246,7 +1246,7 @@ "option": {"specVersion": "json-ld-1.0"}, "input": "compact/e001-in.jsonld", "context": "compact/e001-context.jsonld", - "expect": "compaction to list of lists" + "expectErrorCode": "compaction to list of lists" }, { "@id": "#te002", "@type": [ "jld:NegativeEvaluationTest", "jld:CompactTest" ], @@ -1255,7 +1255,7 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "compact/e002-in.jsonld", "context": "compact/e002-context.jsonld", - "expect": "IRI confused with prefix" + "expectErrorCode": "IRI confused with prefix" }, { "@id": "#ten01", "@type": [ "jld:NegativeEvaluationTest", "jld:CompactTest" ], @@ -1263,7 +1263,7 @@ "purpose": "Transparent Nesting", "input": "compact/en01-in.jsonld", "context": "compact/en01-context.jsonld", - "expect": "invalid @nest value", + "expectErrorCode": "invalid @nest value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tep05", @@ -1272,7 +1272,7 @@ "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": "processing mode conflict", + "expectErrorCode": "processing mode conflict", "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"} }, { "@id": "#tep06", @@ -1282,7 +1282,7 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "compact/ep06-in.jsonld", "context": "compact/ep06-context.jsonld", - "expect": "invalid @version value" + "expectErrorCode": "invalid @version value" }, { "@id": "#tep07", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1291,7 +1291,7 @@ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, "input": "compact/ep07-in.jsonld", "context": "compact/ep07-context.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tep08", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1300,7 +1300,7 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "compact/ep08-in.jsonld", "context": "compact/ep08-context.jsonld", - "expect": "invalid @prefix value" + "expectErrorCode": "invalid @prefix value" }, { "@id": "#tep09", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1309,7 +1309,7 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "compact/ep09-in.jsonld", "context": "compact/ep09-context.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tep10", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1318,7 +1318,7 @@ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, "input": "compact/ep10-in.jsonld", "context": "compact/ep10-context.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tep11", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1327,7 +1327,7 @@ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, "input": "compact/ep11-in.jsonld", "context": "compact/ep11-context.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tep12", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1336,7 +1336,7 @@ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, "input": "compact/ep12-in.jsonld", "context": "compact/ep12-context.jsonld", - "expect": "invalid container mapping" + "expectErrorCode": "invalid container mapping" }, { "@id": "#tep13", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1345,7 +1345,7 @@ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, "input": "compact/ep13-in.jsonld", "context": "compact/ep13-context.jsonld", - "expect": "invalid container mapping" + "expectErrorCode": "invalid container mapping" }, { "@id": "#tep14", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1354,7 +1354,7 @@ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, "input": "compact/ep14-in.jsonld", "context": "compact/ep14-context.jsonld", - "expect": "invalid container mapping" + "expectErrorCode": "invalid container mapping" }, { "@id": "#tep15", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1363,7 +1363,7 @@ "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}, "input": "compact/ep15-in.jsonld", "context": "compact/ep15-context.jsonld", - "expect": "invalid container mapping" + "expectErrorCode": "invalid container mapping" }, { "@id": "#tin01", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], @@ -1983,7 +1983,7 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "compact/pr01-in.jsonld", "context": "compact/pr01-context.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr02", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -1992,7 +1992,7 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "compact/pr02-in.jsonld", "context": "compact/pr02-context.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr03", "@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], @@ -2001,7 +2001,7 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "compact/pr03-in.jsonld", "context": "compact/pr03-context.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr04", "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], diff --git a/tests/context.jsonld b/tests/context.jsonld index e465bbf1..dd15e370 100644 --- a/tests/context.jsonld +++ b/tests/context.jsonld @@ -7,13 +7,14 @@ "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "xsd": "http://www.w3.org/2001/XMLSchema#", - "context": { "@type": "@id" }, - "expect": { "@id": "mf:result", "@type": "@id" }, - "frame": { "@type": "@id" }, - "input": { "@id": "mf:action", "@type": "@id" }, - "option": { "@type": "@id"}, - "sequence": { "@id": "mf:entries", "@type": "@id", "@container": "@list" }, - "redirectTo": { "@type": "@id"}, + "context": { "@type": "@id" }, + "expect": { "@id": "mf:result", "@type": "@id" }, + "expectErrorCode": { "@id": "mf:result" }, + "frame": { "@type": "@id" }, + "input": { "@id": "mf:action", "@type": "@id" }, + "option": { "@type": "@id"}, + "sequence": { "@id": "mf:entries", "@type": "@id", "@container": "@list" }, + "redirectTo": { "@type": "@id"}, "name": "mf:name", "purpose": "rdfs:comment", diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld index 5267bd01..707227ae 100644 --- a/tests/expand-manifest.jsonld +++ b/tests/expand-manifest.jsonld @@ -858,7 +858,7 @@ "name": "Verifies that relative IRIs as properties with @vocab: '' in 1.0 generate an error", "purpose": "Relative property IRIs with relative @vocab in 1.0", "input": "expand/0115-in.jsonld", - "expect": "invalid vocab mapping", + "expectErrorCode": "invalid vocab mapping", "option": {"specVersion": "json-ld-1.0"} }, { "@id": "#t0116", @@ -866,7 +866,7 @@ "name": "Verifies that relative IRIs as properties with relative @vocab in 1.0 generate an error", "purpose": "Relative property IRIs with relative @vocab in 1.0", "input": "expand/0116-in.jsonld", - "expect": "invalid vocab mapping", + "expectErrorCode": "invalid vocab mapping", "option": {"specVersion": "json-ld-1.0"} }, { "@id": "#tc001", @@ -1098,7 +1098,7 @@ "name": "@propagate is invalid in 1.0", "purpose": "@propagate is invalid in 1.0", "input": "expand/c029-in.jsonld", - "expect": "invalid context member", + "expectErrorCode": "invalid context member", "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"} }, { "@id": "#tc030", @@ -1106,7 +1106,7 @@ "name": "@propagate must be boolean valued", "purpose": "@propagate must be boolean valued", "input": "expand/c030-in.jsonld", - "expect": "invalid @propagate value", + "expectErrorCode": "invalid @propagate value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tdi01", @@ -1171,7 +1171,7 @@ "purpose": "Generate an error if @direction has illegal value.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/di08-in.jsonld", - "expect": "invalid base direction" + "expectErrorCode": "invalid base direction" }, { "@id": "#tdi09", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], @@ -1179,21 +1179,21 @@ "purpose": "Value objects can have either @type but not @language or @direction.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/di09-in.jsonld", - "expect": "invalid value object" + "expectErrorCode": "invalid value object" }, { "@id": "#te001", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Keywords cannot be aliased to other keywords", "purpose": "Verifies that an exception is raised on expansion when processing an invalid context aliasing a keyword to another keyword", "input": "expand/e001-in.jsonld", - "expect": "keyword redefinition" + "expectErrorCode": "keyword redefinition" }, { "@id": "#te002", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "A context may not include itself recursively (direct)", "purpose": "Verifies that an exception is raised on expansion when processing a context referencing itself", "input": "expand/e002-in.jsonld", - "expect": "recursive context inclusion", + "expectErrorCode": "recursive context inclusion", "option": {"specVersion": "json-ld-1.0"} }, { "@id": "#te003", @@ -1201,7 +1201,7 @@ "name": "A context may not include itself recursively (indirect)", "purpose": "Verifies that an exception is raised on expansion when processing a context referencing itself indirectly", "input": "expand/e003-in.jsonld", - "expect": "recursive context inclusion", + "expectErrorCode": "recursive context inclusion", "option": {"specVersion": "json-ld-1.0"} }, { "@id": "#te004", @@ -1209,14 +1209,14 @@ "name": "Error dereferencing a remote context", "purpose": "Verifies that an exception is raised on expansion when a context dereference results in an error", "input": "expand/e004-in.jsonld", - "expect": "loading remote context failed" + "expectErrorCode": "loading remote context failed" }, { "@id": "#te005", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid remote context", "purpose": "Verifies that an exception is raised on expansion when a remote context is not an object containing @context", "input": "expand/e005-in.jsonld", - "expect": "invalid remote context", + "expectErrorCode": "invalid remote context", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te006", @@ -1224,112 +1224,112 @@ "name": "Invalid local context", "purpose": "Verifies that an exception is raised on expansion when a context is not a string or object", "input": "expand/e006-in.jsonld", - "expect": "invalid local context" + "expectErrorCode": "invalid local context" }, { "@id": "#te007", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid base IRI", "purpose": "Verifies that an exception is raised on expansion when a context contains an invalid @base", "input": "expand/e007-in.jsonld", - "expect": "invalid base IRI" + "expectErrorCode": "invalid base IRI" }, { "@id": "#te008", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid vocab mapping", "purpose": "Verifies that an exception is raised on expansion when a context contains an invalid @vocab mapping", "input": "expand/e008-in.jsonld", - "expect": "invalid vocab mapping" + "expectErrorCode": "invalid vocab mapping" }, { "@id": "#te009", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid default language", "purpose": "Verifies that an exception is raised on expansion when a context contains an invalid @language", "input": "expand/e009-in.jsonld", - "expect": "invalid default language" + "expectErrorCode": "invalid default language" }, { "@id": "#te010", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Cyclic IRI mapping", "purpose": "Verifies that an exception is raised on expansion when a cyclic IRI mapping is found", "input": "expand/e010-in.jsonld", - "expect": "cyclic IRI mapping" + "expectErrorCode": "cyclic IRI mapping" }, { "@id": "#te011", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid term definition", "purpose": "Verifies that an exception is raised on expansion when a invalid term definition is found", "input": "expand/e011-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#te012", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid type mapping (not a string)", "purpose": "Verifies that an exception is raised on expansion when a invalid type mapping is found", "input": "expand/e012-in.jsonld", - "expect": "invalid type mapping" + "expectErrorCode": "invalid type mapping" }, { "@id": "#te013", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid type mapping (not absolute IRI)", "purpose": "Verifies that an exception is raised on expansion when a invalid type mapping is found", "input": "expand/e013-in.jsonld", - "expect": "invalid type mapping" + "expectErrorCode": "invalid type mapping" }, { "@id": "#te014", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid reverse property (contains @id)", "purpose": "Verifies that an exception is raised on expansion when a invalid reverse property is found", "input": "expand/e014-in.jsonld", - "expect": "invalid reverse property" + "expectErrorCode": "invalid reverse property" }, { "@id": "#te015", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid IRI mapping (@reverse not a string)", "purpose": "Verifies that an exception is raised on expansion when a invalid IRI mapping is found", "input": "expand/e015-in.jsonld", - "expect": "invalid IRI mapping" + "expectErrorCode": "invalid IRI mapping" }, { "@id": "#te016", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid IRI mapping (not an absolute IRI)", "purpose": "Verifies that an exception is raised on expansion when a invalid IRI mapping is found", "input": "expand/e016-in.jsonld", - "expect": "invalid IRI mapping" + "expectErrorCode": "invalid IRI mapping" }, { "@id": "#te017", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid reverse property (invalid @container)", "purpose": "Verifies that an exception is raised on expansion when a invalid reverse property is found", "input": "expand/e017-in.jsonld", - "expect": "invalid reverse property" + "expectErrorCode": "invalid reverse property" }, { "@id": "#te018", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid IRI mapping (@id not a string)", "purpose": "Verifies that an exception is raised on expansion when a invalid IRI mapping is found", "input": "expand/e018-in.jsonld", - "expect": "invalid IRI mapping" + "expectErrorCode": "invalid IRI mapping" }, { "@id": "#te019", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid keyword alias", "purpose": "Verifies that an exception is raised on expansion when a invalid keyword alias is found", "input": "expand/e019-in.jsonld", - "expect": "invalid keyword alias" + "expectErrorCode": "invalid keyword alias" }, { "@id": "#te020", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid IRI mapping (no vocab mapping)", "purpose": "Verifies that an exception is raised on expansion when a invalid IRI mapping is found", "input": "expand/e020-in.jsonld", - "expect": "invalid IRI mapping" + "expectErrorCode": "invalid IRI mapping" }, { "@id": "#te021", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid container mapping", "purpose": "Verifies that an exception is raised on expansion when a invalid container mapping is found", "input": "expand/e021-in.jsonld", - "expect": "invalid container mapping", + "expectErrorCode": "invalid container mapping", "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"} }, { "@id": "#te022", @@ -1337,21 +1337,21 @@ "name": "Invalid language mapping", "purpose": "Verifies that an exception is raised on expansion when a invalid language mapping is found", "input": "expand/e022-in.jsonld", - "expect": "invalid language mapping" + "expectErrorCode": "invalid language mapping" }, { "@id": "#te023", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid IRI mapping (relative IRI in @type)", "purpose": "Verifies that an exception is raised on expansion when a invalid type mapping is found", "input": "expand/e023-in.jsonld", - "expect": "invalid type mapping" + "expectErrorCode": "invalid type mapping" }, { "@id": "#te024", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "List of lists (from array)", "purpose": "Verifies that an exception is raised in Expansion when a list of lists is found", "input": "expand/e024-in.jsonld", - "expect": "list of lists", + "expectErrorCode": "list of lists", "option": {"specVersion": "json-ld-1.0"} }, { "@id": "#te025", @@ -1359,56 +1359,56 @@ "name": "Invalid reverse property map", "purpose": "Verifies that an exception is raised in Expansion when a invalid reverse property map is found", "input": "expand/e025-in.jsonld", - "expect": "invalid reverse property map" + "expectErrorCode": "invalid reverse property map" }, { "@id": "#te026", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Colliding keywords", "purpose": "Verifies that an exception is raised in Expansion when colliding keywords are found", "input": "expand/e026-in.jsonld", - "expect": "colliding keywords" + "expectErrorCode": "colliding keywords" }, { "@id": "#te027", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid @id value", "purpose": "Verifies that an exception is raised in Expansion when an invalid @id value is found", "input": "expand/e027-in.jsonld", - "expect": "invalid @id value" + "expectErrorCode": "invalid @id value" }, { "@id": "#te028", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid type value", "purpose": "Verifies that an exception is raised in Expansion when an invalid type value is found", "input": "expand/e028-in.jsonld", - "expect": "invalid type value" + "expectErrorCode": "invalid type value" }, { "@id": "#te029", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid value object value", "purpose": "Verifies that an exception is raised in Expansion when an invalid value object value is found", "input": "expand/e029-in.jsonld", - "expect": "invalid value object value" + "expectErrorCode": "invalid value object value" }, { "@id": "#te030", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid language-tagged string", "purpose": "Verifies that an exception is raised in Expansion when an invalid language-tagged string value is found", "input": "expand/e030-in.jsonld", - "expect": "invalid language-tagged string" + "expectErrorCode": "invalid language-tagged string" }, { "@id": "#te031", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid @index value", "purpose": "Verifies that an exception is raised in Expansion when an invalid @index value value is found", "input": "expand/e031-in.jsonld", - "expect": "invalid @index value" + "expectErrorCode": "invalid @index value" }, { "@id": "#te032", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "List of lists (from array)", "purpose": "Verifies that an exception is raised in Expansion when a list of lists is found", "input": "expand/e032-in.jsonld", - "expect": "list of lists", + "expectErrorCode": "list of lists", "option": {"specVersion": "json-ld-1.0"} }, { "@id": "#te033", @@ -1416,63 +1416,63 @@ "name": "Invalid @reverse value", "purpose": "Verifies that an exception is raised in Expansion when an invalid @reverse value is found", "input": "expand/e033-in.jsonld", - "expect": "invalid @reverse value" + "expectErrorCode": "invalid @reverse value" }, { "@id": "#te034", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid reverse property value (in @reverse)", "purpose": "Verifies that an exception is raised in Expansion when an invalid reverse property value is found", "input": "expand/e034-in.jsonld", - "expect": "invalid reverse property value" + "expectErrorCode": "invalid reverse property value" }, { "@id": "#te035", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid language map value", "purpose": "Verifies that an exception is raised in Expansion when an invalid language map value is found", "input": "expand/e035-in.jsonld", - "expect": "invalid language map value" + "expectErrorCode": "invalid language map value" }, { "@id": "#te036", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid reverse property value (through coercion)", "purpose": "Verifies that an exception is raised in Expansion when an invalid reverse property value is found", "input": "expand/e036-in.jsonld", - "expect": "invalid reverse property value" + "expectErrorCode": "invalid reverse property value" }, { "@id": "#te037", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid value object (unexpected keyword)", "purpose": "Verifies that an exception is raised in Expansion when an invalid value object is found", "input": "expand/e037-in.jsonld", - "expect": "invalid value object" + "expectErrorCode": "invalid value object" }, { "@id": "#te038", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid value object (@type and @language)", "purpose": "Verifies that an exception is raised in Expansion when an invalid value object is found", "input": "expand/e038-in.jsonld", - "expect": "invalid value object" + "expectErrorCode": "invalid value object" }, { "@id": "#te039", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid language-tagged value", "purpose": "Verifies that an exception is raised in Expansion when an invalid language-tagged value is found", "input": "expand/e039-in.jsonld", - "expect": "invalid language-tagged value" + "expectErrorCode": "invalid language-tagged value" }, { "@id": "#te040", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid typed value", "purpose": "Verifies that an exception is raised in Expansion when an invalid typed value is found", "input": "expand/e040-in.jsonld", - "expect": "invalid typed value" + "expectErrorCode": "invalid typed value" }, { "@id": "#te041", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], "name": "Invalid set or list object", "purpose": "Verifies that an exception is raised in Expansion when an invalid set or list object is found", "input": "expand/e041-in.jsonld", - "expect": "invalid set or list object" + "expectErrorCode": "invalid set or list object" }, { "@id": "#te042", "@type": [ "jld:NegativeEvaluationTest", "jld:ExpandTest" ], @@ -1480,14 +1480,14 @@ "purpose": "Verifies that an exception is raised on expansion when processing an invalid context attempting to define @container on a keyword", "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}, "input": "expand/e042-in.jsonld", - "expect": "keyword redefinition" + "expectErrorCode": "keyword redefinition" }, { "@id": "#te043", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], "name": "Term definition with @id: @type", "purpose": "Expanding term mapping to @type uses @type syntax now illegal", "input": "expand/e043-in.jsonld", - "expect": "invalid IRI mapping", + "expectErrorCode": "invalid IRI mapping", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te044", @@ -1495,7 +1495,7 @@ "name": "Redefine terms looking like compact IRIs", "purpose": "Term definitions may look like compact IRIs, but must be consistent.", "input": "expand/e044-in.jsonld", - "expect": "invalid IRI mapping", + "expectErrorCode": "invalid IRI mapping", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te046", @@ -1519,7 +1519,7 @@ "name": "Invalid term as relative IRI", "purpose": "Verifies that a relative IRI cannot be used as a term.", "input": "expand/e048-in.jsonld", - "expect": "invalid IRI mapping", + "expectErrorCode": "invalid IRI mapping", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te049", @@ -1527,7 +1527,7 @@ "name": "A relative IRI cannot be used as a prefix", "purpose": "Verifies that a relative IRI cannot be used as a term.", "input": "expand/e049-in.jsonld", - "expect": "invalid term definition", + "expectErrorCode": "invalid term definition", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tec01", @@ -1535,7 +1535,7 @@ "name": "Invalid keyword in term definition", "purpose": "Verifies that an exception is raised on expansion when a invalid term definition is found", "input": "expand/ec01-in.jsonld", - "expect": "invalid term definition", + "expectErrorCode": "invalid term definition", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tem01", @@ -1543,7 +1543,7 @@ "name": "Invalid container mapping", "purpose": "Verifies that an exception is raised on expansion when a invalid container mapping is found", "input": "expand/em01-in.jsonld", - "expect": "invalid container mapping", + "expectErrorCode": "invalid container mapping", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#ten01", @@ -1551,7 +1551,7 @@ "name": "@nest MUST NOT have a string value", "purpose": "container: @nest", "input": "expand/en01-in.jsonld", - "expect": "invalid @nest value", + "expectErrorCode": "invalid @nest value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#ten02", @@ -1559,7 +1559,7 @@ "name": "@nest MUST NOT have a boolen value", "purpose": "Transparent Nesting", "input": "expand/en02-in.jsonld", - "expect": "invalid @nest value", + "expectErrorCode": "invalid @nest value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#ten03", @@ -1567,7 +1567,7 @@ "name": "@nest MUST NOT have a numeric value", "purpose": "Transparent Nesting", "input": "expand/en03-in.jsonld", - "expect": "invalid @nest value", + "expectErrorCode": "invalid @nest value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#ten04", @@ -1575,7 +1575,7 @@ "name": "@nest MUST NOT have a value object value", "purpose": "Transparent Nesting", "input": "expand/en04-in.jsonld", - "expect": "invalid @nest value", + "expectErrorCode": "invalid @nest value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#ten05", @@ -1583,7 +1583,7 @@ "name": "does not allow a keyword other than @nest for the value of @nest", "purpose": "Transparent Nesting", "input": "expand/en05-in.jsonld", - "expect": "invalid @nest value", + "expectErrorCode": "invalid @nest value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#ten06", @@ -1591,7 +1591,7 @@ "name": "does not allow @nest with @reverse", "purpose": "Transparent Nesting", "input": "expand/en06-in.jsonld", - "expect": "invalid reverse property", + "expectErrorCode": "invalid reverse property", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tep02", @@ -1599,7 +1599,7 @@ "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": "expand/ep02-in.jsonld", - "expect": "processing mode conflict", + "expectErrorCode": "processing mode conflict", "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"} }, { "@id": "#tep03", @@ -1608,14 +1608,14 @@ "purpose": "If @version is specified, it must be 1.1", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/ep03-in.jsonld", - "expect": "invalid @version value" + "expectErrorCode": "invalid @version value" }, { "@id": "#tes01", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], "name": "Using an array value for @context is illegal in JSON-LD 1.0", "purpose": "Verifies that an exception is raised on expansion when a invalid container mapping is found", "input": "expand/es01-in.jsonld", - "expect": "invalid container mapping", + "expectErrorCode": "invalid container mapping", "option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"} }, { "@id": "#tes02", @@ -1623,7 +1623,7 @@ "name": "Mapping @container: [@list, @set] is invalid", "purpose": "Testing legal combinations of @set with other container values", "input": "expand/es02-in.jsonld", - "expect": "invalid container mapping", + "expectErrorCode": "invalid container mapping", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tin01", @@ -1679,7 +1679,7 @@ "name": "Error if @included value is a string", "purpose": "Tests included maps.", "input": "expand/in07-in.jsonld", - "expect": "invalid @included value", + "expectErrorCode": "invalid @included value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tin08", @@ -1687,7 +1687,7 @@ "name": "Error if @included value is a value object", "purpose": "Tests included maps.", "input": "expand/in08-in.jsonld", - "expect": "invalid @included value", + "expectErrorCode": "invalid @included value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tin09", @@ -1695,7 +1695,7 @@ "name": "Error if @included value is a list object", "purpose": "Tests included maps.", "input": "expand/in09-in.jsonld", - "expect": "invalid @included value", + "expectErrorCode": "invalid @included value", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tjs01", @@ -2039,7 +2039,7 @@ "name": "string value of type map must not be a literal", "purpose": "index on @type", "input": "expand/m020-in.jsonld", - "expect": "invalid type mapping", + "expectErrorCode": "invalid type mapping", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tn001", @@ -2144,7 +2144,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}, "input": "expand/pi01-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpi02", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2152,7 +2152,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pi02-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpi03", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2160,7 +2160,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pi03-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpi04", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2168,7 +2168,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pi04-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpi05", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2176,7 +2176,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pi05-in.jsonld", - "expect": "invalid value object" + "expectErrorCode": "invalid value object" }, { "@id": "#tpi06", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2232,7 +2232,7 @@ "purpose": "Check error when overriding a protected term.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr01-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr02", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2248,7 +2248,7 @@ "purpose": "A protected context protects all term definitions.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr03-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr04", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2256,7 +2256,7 @@ "purpose": "A protected context does not protect terms with @protected: false.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr04-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr05", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2264,7 +2264,7 @@ "purpose": "The Active context be set to null from an embedded context.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr05-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr06", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2280,7 +2280,7 @@ "purpose": "A scoped context can protect terms.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr08-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr09", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2288,7 +2288,7 @@ "purpose": "A protected term cannot redefine another protected term.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr09-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr10", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2304,7 +2304,7 @@ "purpose": "Fail to override protected term.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr11-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr12", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2312,7 +2312,7 @@ "purpose": "Scoped context fail to override protected term.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr12-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr13", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2352,7 +2352,7 @@ "purpose": "Fail to override protected terms with type.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr17-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr18", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2360,7 +2360,7 @@ "purpose": "Fail to override protected terms with type+null+ctx.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr18-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr19", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2376,7 +2376,7 @@ "purpose": "Fail with mix of protected and unprotected terms with type+null+ctx.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr20-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr21", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2384,7 +2384,7 @@ "purpose": "Fail with mix of protected and unprotected terms with type+null.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr21-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr22", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2424,7 +2424,7 @@ "purpose": "Fails on redefinition of terms with scoped contexts using different definitions.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr26-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr27", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2440,7 +2440,7 @@ "purpose": "A protected term with a null IRI mapping cannot be redefined.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr28-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr29", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2464,7 +2464,7 @@ "purpose": "Keywords may not be redefined other than to protect them.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr31-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr32", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2472,7 +2472,7 @@ "purpose": "Keywords may not be redefined other than to protect them.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr32-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr33", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2480,7 +2480,7 @@ "purpose": "Keyword aliases can not be used as prefixes.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr33-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpr34", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2520,7 +2520,7 @@ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr38-in.jsonld", - "expect": "invalid IRI mapping" + "expectErrorCode": "invalid IRI mapping" }, { "@id": "#tpr39", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2528,7 +2528,7 @@ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr39-in.jsonld", - "expect": "invalid IRI mapping" + "expectErrorCode": "invalid IRI mapping" }, { "@id": "#tso01", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2536,7 +2536,7 @@ "purpose": "@import is invalid in 1.0.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/so01-in.jsonld", - "expect": "invalid context member" + "expectErrorCode": "invalid context member" }, { "@id": "#tso02", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2544,7 +2544,7 @@ "purpose": "@import must be a string.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/so02-in.jsonld", - "expect": "invalid @import value" + "expectErrorCode": "invalid @import value" }, { "@id": "#tso03", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], @@ -2552,7 +2552,7 @@ "purpose": "Processors must detect source contexts that include @import.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/so03-in.jsonld", - "expect": "invalid context member" + "expectErrorCode": "invalid context member" }, { "@id": "#tso05", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2576,7 +2576,7 @@ "purpose": "A protected context protects all term definitions.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/so07-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tso08", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2600,7 +2600,7 @@ "purpose": "The containing context is merged into the source context.", "option": {"specVersion": "json-ld-1.1"}, "input": "expand/so10-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tso11", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -2616,7 +2616,7 @@ "purpose": "@type: @none is illegal in json-ld-1.0.", "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}, "input": "expand/tn01-in.jsonld", - "expect": "invalid type mapping" + "expectErrorCode": "invalid type mapping" }, { "@id": "#ttn02", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], diff --git a/tests/flatten-manifest.jsonld b/tests/flatten-manifest.jsonld index e608920b..83d78539 100644 --- a/tests/flatten-manifest.jsonld +++ b/tests/flatten-manifest.jsonld @@ -357,7 +357,7 @@ "purpose": "Verifies that an exception is raised in Flattening when conflicting indexes are found", "option": {"specVersion": "json-ld-1.1"}, "input": "flatten/e001-in.jsonld", - "expect": "conflicting indexes" + "expectErrorCode": "conflicting indexes" }, { "@id": "#tin01", "@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"], diff --git a/tests/fromRdf-manifest.jsonld b/tests/fromRdf-manifest.jsonld index 39ac4d10..3240b818 100644 --- a/tests/fromRdf-manifest.jsonld +++ b/tests/fromRdf-manifest.jsonld @@ -354,7 +354,7 @@ "name": "Invalid JSON literal (bare-word)", "purpose": "Processors must generate an error when deserializing an invalid JSON literal.", "input": "fromRdf/js08-in.nq", - "expect": "invalid JSON literal", + "expectErrorCode": "invalid JSON literal", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tjs09", @@ -362,7 +362,7 @@ "name": "Invalid JSON literal (invalid structure)", "purpose": "Processors must generate an error when deserializing an invalid JSON literal.", "input": "fromRdf/js09-in.nq", - "expect": "invalid JSON literal", + "expectErrorCode": "invalid JSON literal", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tjs10", diff --git a/tests/html-manifest.jsonld b/tests/html-manifest.jsonld index 9798b5ee..733dfdab 100644 --- a/tests/html-manifest.jsonld +++ b/tests/html-manifest.jsonld @@ -75,7 +75,7 @@ "name": "Errors if no element found at target", "purpose": "Tests embedded JSON-LD in HTML with fragment identifier that doesn't exist", "input": "html/e011-in.html#third", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te012", @@ -83,7 +83,7 @@ "name": "Errors if targeted element is not a script element", "purpose": "Tests embedded JSON-LD in HTML which isn't a script element", "input": "html/e012-in.html#first", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te013", @@ -91,7 +91,7 @@ "name": "Errors if targeted element does not have type application/ld+json", "purpose": "Tests embedded JSON-LD in HTML with wrong type", "input": "html/e013-in.html#first", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te014", @@ -99,7 +99,7 @@ "name": "Errors if uncommented script text contains comment", "purpose": "Tests embedded JSON-LD in HTML with comments leftover", "input": "html/e014-in.html", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te015", @@ -107,7 +107,7 @@ "name": "Errors if end comment missing", "purpose": "Tests embedded JSON-LD in HTML with unballanced comments", "input": "html/e015-in.html", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te016", @@ -115,7 +115,7 @@ "name": "Errors if start comment missing", "purpose": "Tests embedded JSON-LD in HTML with unballanced comments", "input": "html/e016-in.html", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te017", @@ -123,7 +123,7 @@ "name": "Errors if uncommented script is not valid JSON", "purpose": "Tests embedded JSON-LD in HTML which is invalid JSON", "input": "html/e017-in.html", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#te018", @@ -307,7 +307,7 @@ "name": "Errors if no element found at target", "purpose": "Tests embedded JSON-LD in HTML with fragment identifier that doesn't exist", "input": "html/r011-in.html#third", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tr012", @@ -315,7 +315,7 @@ "name": "Errors if targeted element is not a script element", "purpose": "Tests embedded JSON-LD in HTML which isn't a script element", "input": "html/r012-in.html#first", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tr013", @@ -323,7 +323,7 @@ "name": "Errors if targeted element does not have type application/ld+json", "purpose": "Tests embedded JSON-LD in HTML with wrong type", "input": "html/r013-in.html#first", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tr014", @@ -331,7 +331,7 @@ "name": "Errors if uncommented script text contains comment", "purpose": "Tests embedded JSON-LD in HTML with comments leftover", "input": "html/r014-in.html", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tr015", @@ -339,7 +339,7 @@ "name": "Errors if end comment missing", "purpose": "Tests embedded JSON-LD in HTML with unballanced comments", "input": "html/r015-in.html", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tr016", @@ -347,7 +347,7 @@ "name": "Errors if start comment missing", "purpose": "Tests embedded JSON-LD in HTML with unballanced comments", "input": "html/r016-in.html", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tr017", @@ -355,7 +355,7 @@ "name": "Errors if uncommented script is not valid JSON", "purpose": "Tests embedded JSON-LD in HTML which is invalid JSON", "input": "html/r017-in.html", - "expect": "invalid script element", + "expectErrorCode": "invalid script element", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tr018", diff --git a/tests/remote-doc-manifest.jsonld b/tests/remote-doc-manifest.jsonld index 4ee469e0..4d58ea3a 100644 --- a/tests/remote-doc-manifest.jsonld +++ b/tests/remote-doc-manifest.jsonld @@ -39,7 +39,7 @@ "contentType": "application/jldTest" }, "input": "remote-doc/0004-in.jldte", - "expect": "loading document failed" + "expectErrorCode": "loading document failed" }, { "@id": "#t0005", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -79,7 +79,7 @@ "name": "Non-existant file (404)", "purpose": "Loading a non-existant file raises loading document failed error", "input": "remote-doc/missing-in.jsonld", - "expect": "loading document failed" + "expectErrorCode": "loading document failed" }, { "@id": "#t0009", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], @@ -123,7 +123,7 @@ ] }, "input": "remote-doc/0012-in.json", - "expect": "multiple context link headers" + "expectErrorCode": "multiple context link headers" }, { "@id": "#t0013", "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], diff --git a/tests/toRdf-manifest.jsonld b/tests/toRdf-manifest.jsonld index f4165fbc..370d8713 100644 --- a/tests/toRdf-manifest.jsonld +++ b/tests/toRdf-manifest.jsonld @@ -458,7 +458,7 @@ "purpose": "Generate an error if @direction has illegal value.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/di08-in.jsonld", - "expect": "invalid base direction" + "expectErrorCode": "invalid base direction" }, { "@id": "#tdi09", "@type": [ "jld:PositiveEvaluationTest", "jld:ToRDFTest" ], @@ -1348,7 +1348,7 @@ "name": "Verifies that relative IRIs as properties with @vocab: '' in 1.0 generate an error", "purpose": "Pathological relative property IRIs in 1.0", "input": "toRdf/e115-in.jsonld", - "expect": "invalid vocab mapping", + "expectErrorCode": "invalid vocab mapping", "option": {"specVersion": "json-ld-1.0"} }, { "@id": "#te116", @@ -1356,7 +1356,7 @@ "name": "Verifies that relative IRIs as properties with relative @vocab in 1.0 generate an error", "purpose": "Pathological relative property IRIs in 1.0", "input": "toRdf/e116-in.jsonld", - "expect": "invalid vocab mapping", + "expectErrorCode": "invalid vocab mapping", "option": {"specVersion": "json-ld-1.0"} }, { "@id": "#tin01", @@ -1700,7 +1700,7 @@ "name": "string value of type map must not be a literal", "purpose": "index on @type", "input": "toRdf/m020-in.jsonld", - "expect": "invalid type mapping", + "expectErrorCode": "invalid type mapping", "option": {"specVersion": "json-ld-1.1"} }, { "@id": "#tn001", @@ -1901,7 +1901,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}, "input": "toRdf/pi01-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpi02", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -1909,7 +1909,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pi02-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpi03", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -1917,7 +1917,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pi03-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpi04", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -1925,7 +1925,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pi04-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpi05", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -1933,7 +1933,7 @@ "purpose": "Expanding index maps where index is a property.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pi05-in.jsonld", - "expect": "invalid value object" + "expectErrorCode": "invalid value object" }, { "@id": "#tpi06", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -1989,7 +1989,7 @@ "purpose": "Check error when overriding a protected term.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr01-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr02", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2005,7 +2005,7 @@ "purpose": "A protected context protects all term definitions.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr03-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr04", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2013,7 +2013,7 @@ "purpose": "A protected context does not protect terms with @protected: false.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr04-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr05", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2021,7 +2021,7 @@ "purpose": "The Active context be set to null from an embedded context.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr05-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr06", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2037,7 +2037,7 @@ "purpose": "A scoped context can protect terms.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr08-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr09", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2045,7 +2045,7 @@ "purpose": "A protected term cannot redefine another protected term.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr09-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr10", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2061,7 +2061,7 @@ "purpose": "Fail to override protected term.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr11-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr12", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2069,7 +2069,7 @@ "purpose": "Scoped context fail to override protected term.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr12-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr13", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2109,7 +2109,7 @@ "purpose": "Fail to override protected terms with type.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr17-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr18", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2117,7 +2117,7 @@ "purpose": "Fail to override protected terms with type+null+ctx.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr18-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr19", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2133,7 +2133,7 @@ "purpose": "Fail with mix of protected and unprotected terms with type+null+ctx.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr20-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr21", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2141,7 +2141,7 @@ "purpose": "Fail with mix of protected and unprotected terms with type+null.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr21-in.jsonld", - "expect": "invalid context nullification" + "expectErrorCode": "invalid context nullification" }, { "@id": "#tpr22", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2181,7 +2181,7 @@ "purpose": "Fails on redefinition of terms with scoped contexts using different definitions.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr26-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr27", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2197,7 +2197,7 @@ "purpose": "A protected term with a null IRI mapping cannot be redefined.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr28-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr29", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2221,7 +2221,7 @@ "purpose": "Keywords may not be redefined other than to protect them.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr31-in.jsonld", - "expect": "term redefinition" + "expectErrorCode": "term redefinition" }, { "@id": "#tpr32", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2229,7 +2229,7 @@ "purpose": "Keywords may not be redefined other than to protect them.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr32-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tpr33", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2237,7 +2237,7 @@ "purpose": "Keyword aliases can not be used as prefixes.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr33-in.jsonld", - "expect": "invalid term definition" + "expectErrorCode": "invalid term definition" }, { "@id": "#tpr34", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2277,7 +2277,7 @@ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr38-in.jsonld", - "expect": "invalid IRI mapping" + "expectErrorCode": "invalid IRI mapping" }, { "@id": "#tpr39", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2285,7 +2285,7 @@ "purpose": "Terms in the form of a keyword, which are not keywords, are ignored.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr39-in.jsonld", - "expect": "invalid IRI mapping" + "expectErrorCode": "invalid IRI mapping" }, { "@id": "#trt01", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2301,7 +2301,7 @@ "purpose": "@import is invalid in 1.0.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/so01-in.jsonld", - "expect": "invalid context member" + "expectErrorCode": "invalid context member" }, { "@id": "#tso02", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2309,7 +2309,7 @@ "purpose": "@import must be a string.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/so02-in.jsonld", - "expect": "invalid @import value" + "expectErrorCode": "invalid @import value" }, { "@id": "#tso03", "@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"], @@ -2317,7 +2317,7 @@ "purpose": "Processors must detect source contexts that include @import.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/so03-in.jsonld", - "expect": "invalid context member" + "expectErrorCode": "invalid context member" }, { "@id": "#tso05", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2341,7 +2341,7 @@ "purpose": "A protected context protects all term definitions.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/so07-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tso08", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2365,7 +2365,7 @@ "purpose": "The containing context is merged into the source context.", "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/so10-in.jsonld", - "expect": "protected term redefinition" + "expectErrorCode": "protected term redefinition" }, { "@id": "#tso11", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], @@ -2381,7 +2381,7 @@ "purpose": "@type: @none is illegal in json-ld-1.0.", "option": {"specVersion": "json-ld-1.1", "processingMode": "json-ld-1.0"}, "input": "toRdf/tn01-in.jsonld", - "expect": "invalid type mapping" + "expectErrorCode": "invalid type mapping" }, { "@id": "#ttn02", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], From b9659eecfb1f43c5bc56719b0ff6034afca8a735 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Wed, 23 Oct 2019 09:23:01 +0200 Subject: [PATCH 2/2] Update templates and vocab to use expectErrorCode, and regen test HTML --- tests/expand-manifest.html | 56 ++++++++++++++++++++++++++++++++++++++ tests/template.haml | 2 +- tests/vocab.html | 10 +++---- tests/vocab.jsonld | 6 ++-- tests/vocab.ttl | 7 +++-- 5 files changed, 69 insertions(+), 12 deletions(-) diff --git a/tests/expand-manifest.html b/tests/expand-manifest.html index 335d0c7e..866f4244 100644 --- a/tests/expand-manifest.html +++ b/tests/expand-manifest.html @@ -4961,6 +4961,62 @@

+
+Test te048 Invalid term as relative IRI +
+
+
+
id
+
#te048
+
Type
+
jld:NegativeEvaluationTest, jld:ExpandTest
+
Purpose
+
Verifies that a relative IRI cannot be used as a term.
+
input
+
+expand/e048-in.jsonld +
+
expect
+
+invalid IRI mapping +
+
Options
+
+
+
specVersion
+
json-ld-1.1
+
+
+
+
+
+Test te049 A relative IRI cannot be used as a prefix +
+
+
+
id
+
#te049
+
Type
+
jld:NegativeEvaluationTest, jld:ExpandTest
+
Purpose
+
Verifies that a relative IRI cannot be used as a term.
+
input
+
+expand/e049-in.jsonld +
+
expect
+
+invalid term definition +
+
Options
+
+
+
specVersion
+
json-ld-1.1
+
+
+
+
Test tec01 Invalid keyword in term definition
diff --git a/tests/template.haml b/tests/template.haml index 3bfe7165..4eb5838e 100644 --- a/tests/template.haml +++ b/tests/template.haml @@ -177,7 +177,7 @@ %dt="expect" %dd - if entry['@type'].to_s.include?('Negative') - =entry['expect'] + =entry['expectErrorCode'] - else %a{href: entry['expect']}=entry['expect'] - if entry['option'] diff --git a/tests/vocab.html b/tests/vocab.html index aef8548b..52a91f34 100644 --- a/tests/vocab.html +++ b/tests/vocab.html @@ -62,7 +62,7 @@ "@id": "jld:Test", "rdfs:label": "Superclass of all JSON-LD tests", "@type": "rdfs:Class", - "rdfs:comment": "All JSON-LD tests have an input file referenced using `mf:action` (aliased as \"input\" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using `mf:result` (aliased as \"expect\" in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to \"json-ld-1.1\", unless specified explicitly as a test option." + "rdfs:comment": "All JSON-LD tests have an input file referenced using `mf:action` (aliased as \"input\" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using `mf:result` (aliased as \"expect\" and \"expectErrorCode\" for respectively Positive and Negative Evaluation Tests in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to \"json-ld-1.1\", unless specified explicitly as a test option." }, { "@id": "jld:useNativeTypes", @@ -108,7 +108,7 @@ "rdfs:label": "Positive Evaluation Test", "@type": "rdfs:Class", "rdfs:subClassOf": "jld:Test", - "rdfs:comment": "A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` (aliased as \"input\" in test manifest) results in the error identified by the literal value of `mf:result` (aliased as \"expect\" in test manifest). The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class. See the [README](https://w3c.github.io/json-ld-api/tests/) for more details on running tests." + "rdfs:comment": "A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` (aliased as \"input\" in test manifest) results in the error identified by the literal value of `mf:result` (aliased as \"expectErrorCode\" in test manifest). The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class. See the [README](https://w3c.github.io/json-ld-api/tests/) for more details on running tests." }, { "@id": "jld:HtmlTest", @@ -318,8 +318,8 @@

Test Case Classes

Negative Syntax Test

A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action. Negative syntax tests are tests of which the result should be a parser error.

-
Positive Evaluation Test
-

A Negative Evaluation test is successful when the result of processing the input file specified as mf:action (aliased as "input" in test manifest) results in the error identified by the literal value of mf:result (aliased as "expect" in test manifest). The specifics of invoking test, including the interpretation of options (:option) and other input files are specified through another class. See the README for more details on running tests.

+
Negative Evaluation Test
+

A Negative Evaluation test is successful when the result of processing the input file specified as mf:action (aliased as "input" in test manifest) results in the error identified by the literal value of mf:result (aliased as "expectErrorCode" in test manifest). The specifics of invoking test, including the interpretation of options (:option) and other input files are specified through another class. See the README for more details on running tests.

Positive Evaluation Test

A Positive Evaluation test is successful when the result of processing the input file specified as mf:action (aliased as "input" in test manifest) exactly matches the output file specified as mf:result (aliased as "expect" in test manifest) using the comparison defined in another class. The specifics of invoking test, including the interpretation of options (:option) and other input files are specified through another class.

@@ -331,7 +331,7 @@

Test Case Classes

Options passed to the test runner to affect invocation of the appropriate API method.

Superclass of all JSON-LD tests
-

All JSON-LD tests have an input file referenced using mf:action (aliased as "input" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using mf:result (aliased as "expect" in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to "json-ld-1.1", unless specified explicitly as a test option.

+

All JSON-LD tests have an input file referenced using mf:action (aliased as "input" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using mf:result (aliased as "expect" and "expectErrorCode" for respectively Positive and Negative Evaluation Tests in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to "json-ld-1.1", unless specified explicitly as a test option.

To RDF Evaluation Test

A ToRDFTest modifies either a PositiveEvaluationTest, NegativeEvaluationTest, PositiveSyntaxTest or NegativeSyntaxTest.

diff --git a/tests/vocab.jsonld b/tests/vocab.jsonld index 3bab6132..d9cdb370 100644 --- a/tests/vocab.jsonld +++ b/tests/vocab.jsonld @@ -56,7 +56,7 @@ "@id": "jld:Test", "rdfs:label": "Superclass of all JSON-LD tests", "@type": "rdfs:Class", - "rdfs:comment": "All JSON-LD tests have an input file referenced using `mf:action` (aliased as \"input\" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using `mf:result` (aliased as \"expect\" in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to \"json-ld-1.1\", unless specified explicitly as a test option." + "rdfs:comment": "All JSON-LD tests have an input file referenced using `mf:action` (aliased as \"input\" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using `mf:result` (aliased as \"expect\" and \"expectErrorCode\" for respectively Positive and Negative Evaluation Tests in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to \"json-ld-1.1\", unless specified explicitly as a test option." }, { "@id": "jld:useNativeTypes", @@ -99,10 +99,10 @@ }, { "@id": "jld:NegativeEvaluationTest", - "rdfs:label": "Positive Evaluation Test", + "rdfs:label": "Negative Evaluation Test", "@type": "rdfs:Class", "rdfs:subClassOf": "jld:Test", - "rdfs:comment": "A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` (aliased as \"input\" in test manifest) results in the error identified by the literal value of `mf:result` (aliased as \"expect\" in test manifest). The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class. See the [README](https://w3c.github.io/json-ld-api/tests/) for more details on running tests." + "rdfs:comment": "A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` (aliased as \"input\" in test manifest) results in the error identified by the literal value of `mf:result` (aliased as \"expectErrorCode\" in test manifest). The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class. See the [README](https://w3c.github.io/json-ld-api/tests/) for more details on running tests." }, { "@id": "jld:HtmlTest", diff --git a/tests/vocab.ttl b/tests/vocab.ttl index 756e066c..b2753ad6 100644 --- a/tests/vocab.ttl +++ b/tests/vocab.ttl @@ -25,7 +25,8 @@ All JSON-LD tests have an input file referenced using `mf:action` (aliased as "input" in test manifest). Positive and Negative Evaluation Tests also have a result file - referenced using `mf:result` (aliased as "expect" in test manifest). + referenced using `mf:result` (aliased as "expect" and "expectErrorCode" for + respectively Positive and Negative Evaluation Tests in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to "json-ld-1.1", unless specified explicitly as a test option. @@ -44,13 +45,13 @@ """ . :NegativeEvaluationTest a rdfs:Class ; - rdfs:label "Positive Evaluation Test" ; + rdfs:label "Negative Evaluation Test" ; rdfs:subClassOf :Test ; rdfs:comment """ A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` (aliased as "input" in test manifest) results in the error identified by the literal value of - `mf:result` (aliased as "expect" in test manifest). + `mf:result` (aliased as "expectErrorCode" in test manifest). The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class.