|
291 | 291 | 'Dürst' => '_:a <http://pred> "D\u00FCrst" .', |
292 | 292 | 'simple literal' => '<http://subj> <http://pred> "simple literal" .', |
293 | 293 | 'backslash:\\' => '<http://subj> <http://pred> "backslash:\\\\" .', |
| 294 | + 'squote:\'' => '<http://subj> <http://pred> "squote:\'" .', |
294 | 295 | 'dquote:"' => '<http://subj> <http://pred> "dquote:\"" .', |
295 | 296 | "newline:\n" => '<http://subj> <http://pred> "newline:\n" .', |
296 | 297 | "return\r" => '<http://subj> <http://pred> "return\r" .', |
|
334 | 335 | "line ending with CR NL" => "<http://example.org/resource4> <http://example.org/property> <http://example.org/resource2> .\r\n", |
335 | 336 | "literal escapes (1)" => '<http://example.org/resource7> <http://example.org/property> "simple literal" .', |
336 | 337 | "literal escapes (2)" => '<http://example.org/resource8> <http://example.org/property> "backslash:\\\\" .', |
337 | | - "literal escapes (3)" => '<http://example.org/resource9> <http://example.org/property> "dquote:\"" .', |
338 | | - "literal escapes (4)" => '<http://example.org/resource10> <http://example.org/property> "newline:\n" .', |
339 | | - "literal escapes (5)" => '<http://example.org/resource11> <http://example.org/property> "return:\r" .', |
340 | | - "literal escapes (6)" => '<http://example.org/resource12> <http://example.org/property> "tab:\t" .', |
| 338 | + "literal escapes (3)" => '<http://example.org/resource9> <http://example.org/property> "squote:\'" .', |
| 339 | + "literal escapes (4)" => '<http://example.org/resource9> <http://example.org/property> "dquote:\"" .', |
| 340 | + "literal escapes (5)" => '<http://example.org/resource10> <http://example.org/property> "newline:\n" .', |
| 341 | + "literal escapes (6)" => '<http://example.org/resource11> <http://example.org/property> "return:\r" .', |
| 342 | + "literal escapes (7)" => '<http://example.org/resource12> <http://example.org/property> "tab:\t" .', |
341 | 343 | "Space is optional before final . (2)" => ['<http://example.org/resource14> <http://example.org/property> "x".', '<http://example.org/resource14> <http://example.org/property> "x" .'], |
342 | 344 |
|
343 | 345 | "XML Literals as Datatyped Literals (1)" => '<http://example.org/resource21> <http://example.org/property> ""^^<http://www.w3.org/2000/01/rdf-schema#XMLLiteral> .', |
|
678 | 680 | (0x0E..0x1F).each { |u| expect(writer.escape(u.chr, encoding)).to eq "\\u#{u.to_s(16).upcase.rjust(4, '0')}" } |
679 | 681 | (0x20..0x21).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
680 | 682 | expect(writer.escape(0x22.chr, encoding)).to eq "\\\"" |
681 | | - (0x23..0x5B).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
| 683 | + (0x23..0x26).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
| 684 | + expect(writer.escape(0x27.chr, encoding)).to eq "\\'" |
| 685 | + (0x28..0x5B).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
682 | 686 | expect(writer.escape(0x5C.chr, encoding)).to eq "\\\\" |
683 | 687 | (0x5D..0x7E).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
684 | 688 | expect(writer.escape(0x7F.chr, encoding)).to eq "\\u007F" |
|
738 | 742 | (0x0E..0x1F).each { |u| expect(writer.escape(u.chr, encoding)).to eq "\\u#{u.to_s(16).upcase.rjust(4, '0')}" } |
739 | 743 | (0x20..0x21).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
740 | 744 | expect(writer.escape(0x22.chr, encoding)).to eq "\\\"" |
741 | | - (0x23..0x5B).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
| 745 | + (0x23..0x26).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
| 746 | + expect(writer.escape(0x27.chr, encoding)).to eq "\\'" |
| 747 | + (0x28..0x5B).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
742 | 748 | expect(writer.escape(0x5C.chr, encoding)).to eq "\\\\" |
743 | 749 | (0x5D..0x7E).each { |u| expect(writer.escape(u.chr, encoding)).to eq u.chr } |
744 | 750 | expect(writer.escape(0x7F.chr, encoding)).to eq "\\u007F" |
|
0 commit comments