From a1b677851274b7e5295962658e723cab007f9b85 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 5 Apr 2023 08:58:15 -0400 Subject: Add SERD_READ_ORDERED to preserve blank node ordering in models --- test/extra/pretty/inline-blank-subject.ttl | 6 -- test/extra/pretty/inline-blanks-and-lists.ttl | 76 ------------------------ test/extra/pretty/manifest.ttl | 14 ----- test/extra/syntactic/inline-blank-subject.ttl | 6 ++ test/extra/syntactic/inline-blanks-and-lists.ttl | 76 ++++++++++++++++++++++++ test/extra/syntactic/manifest.ttl | 24 ++++++++ test/meson.build | 5 ++ 7 files changed, 111 insertions(+), 96 deletions(-) delete mode 100644 test/extra/pretty/inline-blank-subject.ttl delete mode 100644 test/extra/pretty/inline-blanks-and-lists.ttl create mode 100644 test/extra/syntactic/inline-blank-subject.ttl create mode 100644 test/extra/syntactic/inline-blanks-and-lists.ttl create mode 100644 test/extra/syntactic/manifest.ttl (limited to 'test') diff --git a/test/extra/pretty/inline-blank-subject.ttl b/test/extra/pretty/inline-blank-subject.ttl deleted file mode 100644 index 87ea8051..00000000 --- a/test/extra/pretty/inline-blank-subject.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix eg: . - -[ - a eg:BlankSubject -] - eg:isA eg:Blank . diff --git a/test/extra/pretty/inline-blanks-and-lists.ttl b/test/extra/pretty/inline-blanks-and-lists.ttl deleted file mode 100644 index 3fdfa4ee..00000000 --- a/test/extra/pretty/inline-blanks-and-lists.ttl +++ /dev/null @@ -1,76 +0,0 @@ -@prefix eg: . - -[ - a eg:TopBlank -] . - -[ - a [] -] . - -[ - a () -] . - -[] - a [] , - [] . - -[] - a [] , - () . - -[] - a () , - [] . - -[] - a () , - () . - -eg:s2 - a eg:SparseThing , - [] , - () , - [] , - [] , - () , - () , - , - [] , - , - () , - , - [] , - eg:o21 , - [] , - eg:o22 , - () , - eg:o23 , - [] , - eg:o24 , - [ - a eg:Child - ] , - [] , - eg:o25 , - [ - a eg:FirstChild - ] , [ - a eg:SecondChild - ] , - () , - eg:o26 , - eg:o27 . - -eg:s3 - a eg:Thing ; - eg:p1 eg:o1 , - [ - a eg:SubThing ; - eg:p2 eg:o2 - ] , [ - a eg:OtherSubThing ; - eg:p3 eg:o3 - ] ; - eg:p4 eg:o4 . diff --git a/test/extra/pretty/manifest.ttl b/test/extra/pretty/manifest.ttl index 6422c9e0..71968ae9 100644 --- a/test/extra/pretty/manifest.ttl +++ b/test/extra/pretty/manifest.ttl @@ -18,8 +18,6 @@ <#empty-list-subject> <#empty-list-subject-and-object> <#graph-abbreviation> - <#inline-blank-subject> - <#inline-blanks-and-lists> <#inline-list-subject> <#langtags> <#list-in-object> @@ -106,18 +104,6 @@ mf:name "graph-abbreviation" ; mf:result . -<#inline-blank-subject> - a rdft:TestTurtleEval ; - mf:action ; - mf:name "inline-blank-subject" ; - mf:result . - -<#inline-blanks-and-lists> - a rdft:TestTurtleEval ; - mf:action ; - mf:name "inline-blanks-and-lists" ; - mf:result . - <#inline-list-subject> a rdft:TestTurtleEval ; mf:action ; diff --git a/test/extra/syntactic/inline-blank-subject.ttl b/test/extra/syntactic/inline-blank-subject.ttl new file mode 100644 index 00000000..87ea8051 --- /dev/null +++ b/test/extra/syntactic/inline-blank-subject.ttl @@ -0,0 +1,6 @@ +@prefix eg: . + +[ + a eg:BlankSubject +] + eg:isA eg:Blank . diff --git a/test/extra/syntactic/inline-blanks-and-lists.ttl b/test/extra/syntactic/inline-blanks-and-lists.ttl new file mode 100644 index 00000000..3fdfa4ee --- /dev/null +++ b/test/extra/syntactic/inline-blanks-and-lists.ttl @@ -0,0 +1,76 @@ +@prefix eg: . + +[ + a eg:TopBlank +] . + +[ + a [] +] . + +[ + a () +] . + +[] + a [] , + [] . + +[] + a [] , + () . + +[] + a () , + [] . + +[] + a () , + () . + +eg:s2 + a eg:SparseThing , + [] , + () , + [] , + [] , + () , + () , + , + [] , + , + () , + , + [] , + eg:o21 , + [] , + eg:o22 , + () , + eg:o23 , + [] , + eg:o24 , + [ + a eg:Child + ] , + [] , + eg:o25 , + [ + a eg:FirstChild + ] , [ + a eg:SecondChild + ] , + () , + eg:o26 , + eg:o27 . + +eg:s3 + a eg:Thing ; + eg:p1 eg:o1 , + [ + a eg:SubThing ; + eg:p2 eg:o2 + ] , [ + a eg:OtherSubThing ; + eg:p3 eg:o3 + ] ; + eg:p4 eg:o4 . diff --git a/test/extra/syntactic/manifest.ttl b/test/extra/syntactic/manifest.ttl new file mode 100644 index 00000000..22507130 --- /dev/null +++ b/test/extra/syntactic/manifest.ttl @@ -0,0 +1,24 @@ +@prefix mf: . +@prefix rdfs: . +@prefix rdft: . +@prefix serd: . + +<> + a mf:Manifest ; + rdfs:comment "Serd syntactic (non-model) pretty-printing test cases" ; + mf:entries ( + <#inline-blank-subject> + <#inline-blanks-and-lists> + ) . + +<#inline-blank-subject> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "inline-blank-subject" ; + mf:result . + +<#inline-blanks-and-lists> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "inline-blanks-and-lists" ; + mf:result . diff --git a/test/meson.build b/test/meson.build index 8e0688f6..1f736afc 100644 --- a/test/meson.build +++ b/test/meson.build @@ -664,6 +664,10 @@ test_suites = { files('extra/pretty/manifest.ttl'), ns_serdtest + 'pretty/', ], + 'syntactic': [ + files('extra/pretty/manifest.ttl'), + ns_serdtest + 'pretty/', + ], 'qualify': [ files('extra/qualify/manifest.ttl'), ns_serdtest + 'qualify/', @@ -712,6 +716,7 @@ if is_variable('serd_sort') 'pattern', 'perfect_forward', 'perfect_reverse', + 'pretty', 'qualify', 'terse', ] -- cgit v1.2.1