## Distributed under both the "W3C Test Suite License" [1]
## and the "W3C 3-clause BSD License".
## [1] https://www.w3.org/Consortium/Legal/2008/04-testsuite-license
## [2] https://www.w3.org/Consortium/Legal/2008/03-bsd-license
##
## Test types
## * rdft:TestNQuadsPositiveC14N – N-Quads canonicalization

PREFIX :     <https://w3c.github.io/rdf-tests/rdf/rdf12/rdf-n-quads/c14n#>
PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mf:   <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>
PREFIX rdft: <http://www.w3.org/ns/rdftest#>

:manifest  a mf:Manifest ;
  rdfs:label "RDF 1.2 N-Quads Canonicalization Test Suite"@en;
  rdfs:comment "Tests the generation of canonical N-Quads."@en;
  mf:assumedTestBase <https://w3c.github.io/rdf-tests/rdf/rdf12/rdf-n-quads/c14n/> ;
  rdfs:seeAlso <README.md>;
  mf:entries (
    :comment_following_triple
    :extra_whitespace-01
    :extra_whitespace-02
    :extra_whitespace-03
    :extra_whitespace-04
    :langtagged_string
    # :lantag_with_subtag
    :dirlangtagged_string
    :literal_all_controls
    :literal_all_punctuation
    :literal_ascii_boundaries
    :literal_with_2_dquotes
    :literal_with_2_squotes
    :literal_with_BACKSPACE
    :literal_with_CARRIAGE_RETURN
    :literal_with_CHARACTER_TABULATION
    :literal_with_dquote
    :literal_with_FORM_FEED
    :literal_with_LINE_FEED
    :literal_with_numeric_escape4
    :literal_with_numeric_escape8
    :literal_with_REVERSE_SOLIDUS
    :literal_with_REVERSE_SOLIDUS2
    :literal_with_squote
    :literal_with_string_dt
    :literal_with_extra_whitespace
    :literal_with_UTF8_boundaries
    :minimal_whitespace-01
    :minimal_whitespace-02
    :triple-term-01
    :triple-term-02
    :triple-term-03
    :triple-term-04
    :nq-syntax-uri-01
    :nq-syntax-uri-02
    :nq-syntax-uri-03
    :nq-syntax-uri-04
    :nq-syntax-str-esc-01
    :nq-syntax-str-esc-02
    :nq-syntax-str-esc-03
  ) .

:comment_following_triple rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N comment_following_triple" ;
  rdfs:comment "Tests canonicalization of quads including comments" ;
  rdft:approval rdft:Proposed ;
  mf:action <comment_following_triple.nq>;
  mf:result <comment_following_triple-c14n.nq>;
  .

:langtagged_string rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N langtagged_string" ;
  rdfs:comment "Tests canonicalization of quads including language-tagged string" ;
  rdft:approval rdft:Proposed ;
  mf:action    <langtagged_string.nq> ;
  mf:result    <langtagged_string-c14n.nq>;
  .

#:lantag_with_subtag rdf:type rdft:TestNQuadsPositiveC14N ;
#  mf:name      "C14N lantag_with_subtag" ;
#  rdfs:comment "Tests canonicalization of quads including language-tagged string with subtag" ;
#  rdft:approval rdft:Proposed ;
#  mf:action    <lantag_with_subtag.nq> ;
#  mf:result    <lantag_with_subtag-c14n.nq>;
#  .

:dirlangtagged_string rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name       "C14N literal with base direction ltr" ;
  rdfs:comment "Tests canonicalization of quads including directional language-tagged string" ;
  rdft:approval rdft:Proposed ;
  mf:action    <dirlangtagged_string.nq> ;
  mf:result    <dirlangtagged_string-c14n.nq>;
  .

:literal_all_controls rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_all_controls" ;
  rdfs:comment "Tests canonicalization of literals with control characters" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_all_controls.nq> ;
  mf:result    <literal_all_controls-c14n.nq>;
  .

:literal_all_punctuation rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_all_punctuation" ;
  rdfs:comment "Tests canonicalization of literals with punctuation characters" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_all_punctuation.nq> ;
  mf:result    <literal_all_punctuation-c14n.nq>;
  .

:literal_ascii_boundaries rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_ascii_boundaries" ;
  rdfs:comment "Tests canonicalization of literal_ascii_boundaries '\\x00\\x26\\x28...'" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_ascii_boundaries.nq> ;
  mf:result    <literal_ascii_boundaries-c14n.nq>;
  .

:literal_with_2_dquotes rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_2_dquotes" ;
  rdfs:comment "Tests canonicalization of literal with 2 dquotes \"\"\"a\"\"b\"\"\"" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_2_dquotes.nq> ;
  mf:result    <literal_with_2_dquotes-c14n.nq>;
  .

:literal_with_2_squotes rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_2_squotes" ;
  rdfs:comment "Tests canonicalization of literal with 2 squotes \"x''y\"" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_2_squotes.nq> ;
  mf:result    <literal_with_2_squotes-c14n.nq>;
  .

:literal_with_BACKSPACE rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_BACKSPACE" ;
  rdfs:comment "Tests canonicalization of literals with backspace" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_BACKSPACE.nq> ;
  mf:result    <literal_with_BACKSPACE-c14n.nq>;
  .

:literal_with_CARRIAGE_RETURN rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_CARRIAGE_RETURN" ;
  rdfs:comment "Tests canonicalization of literals with carriage return" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_CARRIAGE_RETURN.nq> ;
  mf:result    <literal_with_CARRIAGE_RETURN-c14n.nq>;
  .

:literal_with_CHARACTER_TABULATION rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_CHARACTER_TABULATION" ;
  rdfs:comment "Tests canonicalization of literals with character tabulation" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_CHARACTER_TABULATION.nq> ;
  mf:result    <literal_with_CHARACTER_TABULATION-c14n.nq>;
  .

:literal_with_dquote rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_dquote" ;
  rdfs:comment "Tests canonicalization of literals with double quote" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_dquote.nq> ;
  mf:result    <literal_with_dquote-c14n.nq>;
  .

:literal_with_FORM_FEED rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_FORM_FEED" ;
  rdfs:comment "Tests canonicalization of literals with form feed" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_FORM_FEED.nq> ;
  mf:result    <literal_with_FORM_FEED-c14n.nq>;
  .

:literal_with_LINE_FEED rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_LINE_FEED" ;
  rdfs:comment "Tests canonicalization of literals with line feed" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_LINE_FEED.nq> ;
  mf:result    <literal_with_LINE_FEED-c14n.nq>;
  .

:literal_with_numeric_escape4 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_numeric_escape4" ;
  rdfs:comment "Tests canonicalization of literals with numeric escapes" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_numeric_escape4.nq> ;
  mf:result    <literal_with_numeric_escape4-c14n.nq>;
  .

:literal_with_numeric_escape8 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_numeric_escape8" ;
  rdfs:comment "Tests canonicalization of literals with numeric escapes" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_numeric_escape8.nq> ;
  mf:result    <literal_with_numeric_escape8-c14n.nq>;
  .

:literal_with_REVERSE_SOLIDUS rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_REVERSE_SOLIDUS" ;
  rdfs:comment "Tests canonicalization of literals with reverse solidus" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_REVERSE_SOLIDUS.nq> ;
  mf:result    <literal_with_REVERSE_SOLIDUS-c14n.nq>;
  .

:literal_with_REVERSE_SOLIDUS2 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_REVERSE_SOLIDUS2" ;
  rdfs:comment "Tests canonicalization of literals with reverse solidus" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_REVERSE_SOLIDUS2.nq> ;
  mf:result    <literal_with_REVERSE_SOLIDUS2-c14n.nq>;
  .

:literal_with_squote rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_squote" ;
  rdfs:comment "Tests canonicalization of literals with single quotes" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_squote.nq> ;
  mf:result    <literal_with_squote-c14n.nq>;
  .

:literal_with_string_dt rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_string_dt" ;
  rdfs:comment "Tests canonicalization of literal with explicit xsd:string" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_string_dt.nq> ;
  mf:result    <literal_with_string_dt-c14n.nq>;
  .

:literal_with_UTF8_boundaries rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_UTF8_boundaries" ;
  rdfs:comment "Tests canonicalization of literals with UTF8 boundaries" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_UTF8_boundaries.nq> ;
  mf:result    <literal_with_UTF8_boundaries-c14n.nq>;
  .

:literal_with_extra_whitespace rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N literal_with_extra_whitespace" ;
  rdfs:comment "Tests canonicalization of quads with literals having extra whitespace" ;
  rdft:approval rdft:Proposed ;
  mf:action    <literal_with_extra_whitespace.nq> ;
  mf:result    <literal_with_extra_whitespace-c14n.nq>;
  .

:minimal_whitespace-01 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N minimal_whitespace-01" ;
  rdfs:comment "Tests canonicalization of quads without optional whitespace" ;
  rdft:approval rdft:Proposed ;
  mf:action    <minimal_whitespace-01.nq> ;
  mf:result    <minimal_whitespace-01-c14n.nq>;
  .

:triple-term-01 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N triple-term-01" ;
  rdfs:comment "Tests canonicalization of triple terms with iri subject and object" ;
  mf:action    <triple-term-01.nq> ;
  mf:result    <triple-term-01-c14n.nq>;
  .

:triple-term-02 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N triple-term-02" ;
  rdfs:comment "Tests canonicalization of triple terms with iri subject and bnode object" ;
  mf:action    <triple-term-02.nq> ;
  mf:result    <triple-term-02-c14n.nq>;
  .

:triple-term-03 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N triple-term-03" ;
  rdfs:comment "Tests canonicalization of triple terms with iri subject and literal object" ;
  mf:action    <triple-term-03.nq> ;
  mf:result    <triple-term-03-c14n.nq>;
  .

:triple-term-04 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N triple-term-03" ;
  rdfs:comment "Tests canonicalization of triple terms with triple term object" ;
  mf:action    <triple-term-04.nq> ;
  mf:result    <triple-term-04-c14n.nq>;
  .

:minimal_whitespace-02 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N minimal_whitespace-02" ;
  rdfs:comment "Tests canonicalization of quads without optional whitespace" ;
  rdft:approval rdft:Proposed ;
  mf:action    <minimal_whitespace-02.nq> ;
  mf:result    <minimal_whitespace-02-c14n.nq>;
  .

:extra_whitespace-01 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N extra_whitespace-01" ;
  rdfs:comment "Tests canonicalization of quads with extra whitespace" ;
  rdft:approval rdft:Proposed ;
  mf:action    <extra_whitespace-01.nq> ;
  mf:result    <extra_whitespace-01-c14n.nq>;
  .

:extra_whitespace-02 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N extra_whitespace-02" ;
  rdfs:comment "Tests canonicalization of quads with extra whitespace" ;
  rdft:approval rdft:Proposed ;
  mf:action    <extra_whitespace-02.nq> ;
  mf:result    <extra_whitespace-02-c14n.nq>;
  .

:extra_whitespace-03 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N extra_whitespace-03" ;
  rdfs:comment "Tests canonicalization of quads with extra whitespace" ;
  rdft:approval rdft:Proposed ;
  mf:action    <extra_whitespace-03.nq> ;
  mf:result    <extra_whitespace-03-c14n.nq>;
  .

:extra_whitespace-04 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N extra_whitespace-04" ;
  rdfs:comment "Tests canonicalization of quads with extra whitespace" ;
  rdft:approval rdft:Proposed ;
  mf:action    <extra_whitespace-04.nq> ;
  mf:result    <extra_whitespace-04-c14n.nq>;
  .

:nq-syntax-uri-01 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N nq-syntax-uri-01" ;
  rdfs:comment "Tests canonicalization of IRIs" ;
  rdft:approval rdft:Proposed ;
  mf:action    <nq-syntax-uri-01.nq> ;
  mf:result    <nq-syntax-uri-01-c14n.nq>;
  .

:nq-syntax-uri-02 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N nq-syntax-uri-02" ;
  rdfs:comment "Tests canonicalization of IRIs" ;
  rdft:approval rdft:Proposed ;
  mf:action    <nq-syntax-uri-02.nq> ;
  mf:result    <nq-syntax-uri-02-c14n.nq>;
  .

:nq-syntax-uri-03 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N nq-syntax-uri-03" ;
  rdfs:comment "Tests canonicalization of IRIs" ;
  rdft:approval rdft:Proposed ;
  mf:action    <nq-syntax-uri-03.nq> ;
  mf:result    <nq-syntax-uri-03-c14n.nq>;
  .

:nq-syntax-uri-04 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N nq-syntax-uri-04" ;
  rdfs:comment "Tests canonicalization of IRIs" ;
  rdft:approval rdft:Proposed ;
  mf:action    <nq-syntax-uri-04.nq> ;
  mf:result    <nq-syntax-uri-04-c14n.nq>;
  .

:nq-syntax-str-esc-01 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N nq-syntax-str-esc-01" ;
  rdfs:comment "Tests canonicalization of string escapes" ;
  rdft:approval rdft:Proposed ;
  mf:action    <nq-syntax-str-esc-01.nq> ;
  mf:result    <nq-syntax-str-esc-01-c14n.nq>;
  .

:nq-syntax-str-esc-02 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N nq-syntax-str-esc-02" ;
  rdfs:comment "Tests canonicalization of string escapes" ;
  rdft:approval rdft:Proposed ;
  mf:action    <nq-syntax-str-esc-02.nq> ;
  mf:result    <nq-syntax-str-esc-02-c14n.nq>;
  .

:nq-syntax-str-esc-03 rdf:type rdft:TestNQuadsPositiveC14N ;
  mf:name      "C14N nq-syntax-str-esc-03" ;
  rdfs:comment "Tests canonicalization of string escapes" ;
  rdft:approval rdft:Proposed ;
  mf:action    <nq-syntax-str-esc-03.nq> ;
  mf:result    <nq-syntax-str-esc-03-c14n.nq>;
  .
