From bd2d7f510576c2185ddb0e9b8872079dba2a05c7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 28 Mar 2023 12:10:35 -0400 Subject: Fix pretty-printing of anonymous subjects --- test/pretty/inline-blank-subject.ttl | 5 +++ test/pretty/inline-blanks-and-lists.ttl | 61 +++++++++++++++++++++++++++++++++ test/pretty/inline-list-subject.ttl | 6 ++++ test/pretty/list-subject.ttl | 7 ++++ test/pretty/manifest.ttl | 35 +++++++++++++++++++ test/pretty/nested-list-subject.ttl | 11 ++++++ 6 files changed, 125 insertions(+) create mode 100644 test/pretty/inline-blank-subject.ttl create mode 100644 test/pretty/inline-blanks-and-lists.ttl create mode 100644 test/pretty/inline-list-subject.ttl create mode 100644 test/pretty/list-subject.ttl create mode 100644 test/pretty/nested-list-subject.ttl (limited to 'test') diff --git a/test/pretty/inline-blank-subject.ttl b/test/pretty/inline-blank-subject.ttl new file mode 100644 index 00000000..8f5de39c --- /dev/null +++ b/test/pretty/inline-blank-subject.ttl @@ -0,0 +1,5 @@ +@prefix eg: . + +[ + a eg:BlankSubject +] eg:isA eg:Blank . diff --git a/test/pretty/inline-blanks-and-lists.ttl b/test/pretty/inline-blanks-and-lists.ttl new file mode 100644 index 00000000..c57482d3 --- /dev/null +++ b/test/pretty/inline-blanks-and-lists.ttl @@ -0,0 +1,61 @@ +@prefix eg: . + +[ + a eg:TopBlank +] . + +[ + a [] +] . + +[ + a () +] . + +[] + a [] , + [] . + +[] + a [] , + () . + +[] + a () , + [] . + +[] + a () , + () . + +eg:s2 + a eg:SparseThing , + [] , + () , + [] , + [] , + () , + () , + , + [] , + , + () , + , + [] , + eg:o21 , + [] , + eg:o22 , + () , + eg:o23 . + +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/pretty/inline-list-subject.ttl b/test/pretty/inline-list-subject.ttl new file mode 100644 index 00000000..a3f8ac18 --- /dev/null +++ b/test/pretty/inline-list-subject.ttl @@ -0,0 +1,6 @@ +@prefix eg: . + +( + eg:item1 + eg:item2 +) eg:isA eg:List . diff --git a/test/pretty/list-subject.ttl b/test/pretty/list-subject.ttl new file mode 100644 index 00000000..927f56f3 --- /dev/null +++ b/test/pretty/list-subject.ttl @@ -0,0 +1,7 @@ +@prefix eg: . + +( + "apple" + "banana" + "cherry" +) a eg:ExampleList . diff --git a/test/pretty/manifest.ttl b/test/pretty/manifest.ttl index a78aa943..1f653d65 100644 --- a/test/pretty/manifest.ttl +++ b/test/pretty/manifest.ttl @@ -19,9 +19,13 @@ <#empty-list-subject-and-object> <#ext-named-blank> <#graph-abbreviation> + <#inline-blank-subject> + <#inline-blanks-and-lists> + <#inline-list-subject> <#langtags> <#list-in-object> <#list-object> + <#list-subject> <#local-name-escapes> <#long-string-escapes> <#long-string-quotes> @@ -30,6 +34,7 @@ <#nested-list-object> <#short-string-escapes> <#uri-escapes> + <#nested-list-subject> ) . <#abbreviation> @@ -104,6 +109,24 @@ 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 ; + mf:name "inline-list-subject" ; + mf:result . + <#langtags> a rdft:TestTurtleEval ; mf:action ; @@ -122,6 +145,12 @@ mf:name "list-object" ; mf:result . +<#list-subject> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "list-subject" ; + mf:result . + <#local-name-escapes> a rdft:TestTurtleEval ; mf:action ; @@ -158,6 +187,12 @@ mf:name "nested-list-object" ; mf:result . +<#nested-list-subject> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "nested-list-subject" ; + mf:result . + <#short-string-escapes> a rdft:TestTurtleEval ; mf:action ; diff --git a/test/pretty/nested-list-subject.ttl b/test/pretty/nested-list-subject.ttl new file mode 100644 index 00000000..128197c0 --- /dev/null +++ b/test/pretty/nested-list-subject.ttl @@ -0,0 +1,11 @@ +@prefix eg: . + +( + ( + eg:l1e1 + eg:l1e2 + ) ( + eg:l2e1 + eg:l2e2 + ) +) a eg:ExampleList . -- cgit v1.2.1