|
489 | 489 | nil => "http://test/"}) |
490 | 490 | end |
491 | 491 |
|
| 492 | + context "PN_LOCAL" do |
| 493 | + { |
| 494 | + "p:_a": "<http://a.example/_a>", # PN_CHARS_U |
| 495 | + "p::": "<http://a.example/:>", # PN_LOCAL |
| 496 | + "p:0": "<http://a.example/0>", # PN_LOCAL |
| 497 | + "p:%B7": "<http://a.example/%B7>", # PN_LOCAL |
| 498 | + "p:a.b": "<http://a.example/a.b>", # PN_LOCAL |
| 499 | + |
| 500 | + "p:\\_underscore": "<http://a.example/_underscore>", # PN_LOCAL_ESC |
| 501 | + "p:\\~tilda": "<http://a.example/~tilda>", # PN_LOCAL_ESC |
| 502 | + "p:\\.dot": "<http://a.example/.dot>", # PN_LOCAL_ESC |
| 503 | + "p:\\-dash": "<http://a.example/-dash>", # PN_LOCAL_ESC |
| 504 | + "p:\\!exclamation": "<http://a.example/!exclamation>", # PN_LOCAL_ESC |
| 505 | + "p:\\$dollar": "<http://a.example/$dollar>", # PN_LOCAL_ESC |
| 506 | + "p:\\&er": "<http://a.example/&er>", # PN_LOCAL_ESC |
| 507 | + "p:\\'squote": "<http://a.example/'squote>", # PN_LOCAL_ESC |
| 508 | + "p:\\(paren\\)": "<http://a.example/(paren)>", # PN_LOCAL_ESC |
| 509 | + "p:\\*star": "<http://a.example/*star>", # PN_LOCAL_ESC |
| 510 | + "p:\\+plus": "<http://a.example/+plus>", # PN_LOCAL_ESC |
| 511 | + "p:\\,comma": "<http://a.example/,comma>", # PN_LOCAL_ESC |
| 512 | + "p:\\;semi": "<http://a.example/;semi>", # PN_LOCAL_ESC |
| 513 | + "p:\\=equal": "<http://a.example/=equal>", # PN_LOCAL_ESC |
| 514 | + "p:\\/slash": "<http://a.example//slash>", # PN_LOCAL_ESC |
| 515 | + "p:\\?question": "<http://a.example/?question>", # PN_LOCAL_ESC |
| 516 | + "p:\\#numbersign": "<http://a.example/#numbersign>", # PN_LOCAL_ESC |
| 517 | + "p:\\@ampersand": "<http://a.example/@ampersand>", # PN_LOCAL_ESC |
| 518 | + "p:\\%percent": "<http://a.example/%percent>", # PN_LOCAL_ESC |
| 519 | + }.each do |pn, iri| |
| 520 | + it pn do |
| 521 | + ttl = %(PREFIX p: <http://a.example/>\n p:s p:p #{pn} .) |
| 522 | + nt = %(<http://a.example/s> <http://a.example/p> #{iri} .) |
| 523 | + expect(parse(ttl, validate: false)).to be_equivalent_graph(nt, logger: @logger) |
| 524 | + end |
| 525 | + end |
| 526 | + end |
| 527 | + |
492 | 528 | { |
493 | 529 | "@prefix foo: <http://foo/bar#> ." => [true, true], |
494 | 530 | "@PrEfIx foo: <http://foo/bar#> ." => [false, true], |
|
0 commit comments