|
292 | 292 | }, |
293 | 293 | "http://example.org/vocab#contains": "this-is-not-an-IRI" |
294 | 294 | }) |
295 | | - } |
| 295 | + }, |
| 296 | + "Language map term with language value" => { |
| 297 | + input: %([{"http://example/t": {"@value": "foo", "@language": "en"}}]), |
| 298 | + context: %({"t": {"@id": "http://example/t", "@container": "@language"}}), |
| 299 | + output: %({ |
| 300 | + "@context": { |
| 301 | + "t": {"@id": "http://example/t", "@container": "@language"} |
| 302 | + }, |
| 303 | + "t": {"en": "foo"} |
| 304 | + }) |
| 305 | + }, |
| 306 | + "Datatyped term with datatyped value" => { |
| 307 | + input: %([{"http://example/t": {"@value": "foo", "@type": "http:/example/type"}}]), |
| 308 | + context: %({"t": {"@id": "http://example/t", "@type": "http:/example/type"}}), |
| 309 | + output: %({ |
| 310 | + "@context": { |
| 311 | + "t": {"@id": "http://example/t", "@type": "http:/example/type"} |
| 312 | + }, |
| 313 | + "t": "foo" |
| 314 | + }) |
| 315 | + }, |
| 316 | + "Datatyped term with simple value" => { |
| 317 | + input: %([{"http://example/t": {"@value": "foo"}}]), |
| 318 | + context: %({"t": {"@id": "http://example/t", "@type": "http:/example/type"}}), |
| 319 | + output: %({ |
| 320 | + "@context": { |
| 321 | + "t": {"@id": "http://example/t", "@type": "http:/example/type"} |
| 322 | + }, |
| 323 | + "http://example/t": "foo" |
| 324 | + }) |
| 325 | + }, |
| 326 | + "Datatyped term with object value" => { |
| 327 | + input: %([{"http://example/t": {"@id": "http://example/id"}}]), |
| 328 | + context: %({"t": {"@id": "http://example/t", "@type": "http:/example/type"}}), |
| 329 | + output: %({ |
| 330 | + "@context": { |
| 331 | + "t": {"@id": "http://example/t", "@type": "http:/example/type"} |
| 332 | + }, |
| 333 | + "http://example/t": {"@id": "http://example/id"} |
| 334 | + }) |
| 335 | + }, |
296 | 336 | }.each_pair do |title, params| |
297 | 337 | it(title) {run_compact(params)} |
298 | 338 | end |
|
2140 | 2180 |
|
2141 | 2181 | context "compact IRI selection" do |
2142 | 2182 | { |
2143 | | - "compacts using expanded term in 1.0" => { |
| 2183 | + "does not compact using expanded term in 1.0" => { |
2144 | 2184 | input: %({"http://example.org/foo": "term"}), |
2145 | 2185 | context: %({"ex": {"@id": "http://example.org/"}}), |
2146 | 2186 | output: %({ |
2147 | 2187 | "@context": {"ex": {"@id": "http://example.org/"}}, |
2148 | | - "ex:foo": "term" |
| 2188 | + "http://example.org/foo": "term" |
2149 | 2189 | }), |
2150 | 2190 | processingMode: "json-ld-1.0" |
2151 | 2191 | }, |
|
0 commit comments