diff options
author | David Robillard <d@drobilla.net> | 2023-04-05 16:30:39 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-04-06 07:19:11 -0400 |
commit | f43066a36f98b89b4d853d3168ff0fe2edeb41d7 (patch) | |
tree | 05ab27bcf7bbe2b1f7849771c09f1cce5f6a6642 /test/extra | |
parent | c852ef7fbfaf00189f771f0163d796b0b73437ca (diff) | |
download | serd-f43066a36f98b89b4d853d3168ff0fe2edeb41d7.tar.gz serd-f43066a36f98b89b4d853d3168ff0fe2edeb41d7.tar.bz2 serd-f43066a36f98b89b4d853d3168ff0fe2edeb41d7.zip |
Improve pretty-printing of lists and inline subjects
Diffstat (limited to 'test/extra')
-rw-r--r-- | test/extra/pretty/abbreviation.ttl | 3 | ||||
-rw-r--r-- | test/extra/pretty/anonymous-in-list-object.ttl | 3 | ||||
-rw-r--r-- | test/extra/pretty/graph-abbreviation.trig | 3 | ||||
-rw-r--r-- | test/extra/pretty/inline-blank-subject.ttl | 3 | ||||
-rw-r--r-- | test/extra/pretty/inline-blanks-and-lists.ttl | 17 | ||||
-rw-r--r-- | test/extra/pretty/inline-list-subject.ttl | 3 | ||||
-rw-r--r-- | test/extra/pretty/list-subject-with-extras.ttl | 9 | ||||
-rw-r--r-- | test/extra/pretty/list-subject-with-list-extras.ttl | 12 | ||||
-rw-r--r-- | test/extra/pretty/list-subject.ttl | 3 | ||||
-rw-r--r-- | test/extra/pretty/manifest.ttl | 21 | ||||
-rw-r--r-- | test/extra/pretty/nested-list-object-with-empty-lists.ttl | 11 | ||||
-rw-r--r-- | test/extra/pretty/nested-list-object.ttl | 3 | ||||
-rw-r--r-- | test/extra/pretty/nested-list-subject.ttl | 6 |
13 files changed, 87 insertions, 10 deletions
diff --git a/test/extra/pretty/abbreviation.ttl b/test/extra/pretty/abbreviation.ttl index bf46f6d5..95f43c88 100644 --- a/test/extra/pretty/abbreviation.ttl +++ b/test/extra/pretty/abbreviation.ttl @@ -51,7 +51,8 @@ eg:s7 eg:listOfResources ( [ eg:value 7 - ] [ + ] + [ eg:value 8 ] ) . diff --git a/test/extra/pretty/anonymous-in-list-object.ttl b/test/extra/pretty/anonymous-in-list-object.ttl index 4f135e29..a6b202f4 100644 --- a/test/extra/pretty/anonymous-in-list-object.ttl +++ b/test/extra/pretty/anonymous-in-list-object.ttl @@ -4,7 +4,8 @@ eg:s eg:p ( [ a eg:Spy - ] [ + ] + [ a eg:Ninja ] ) . diff --git a/test/extra/pretty/graph-abbreviation.trig b/test/extra/pretty/graph-abbreviation.trig index 8ec75f6e..c6d5e32e 100644 --- a/test/extra/pretty/graph-abbreviation.trig +++ b/test/extra/pretty/graph-abbreviation.trig @@ -53,7 +53,8 @@ :lists ( [ rdf:value 7 - ] [ + ] + [ rdf:value 8 ] ) . diff --git a/test/extra/pretty/inline-blank-subject.ttl b/test/extra/pretty/inline-blank-subject.ttl index 8f5de39c..87ea8051 100644 --- a/test/extra/pretty/inline-blank-subject.ttl +++ b/test/extra/pretty/inline-blank-subject.ttl @@ -2,4 +2,5 @@ [ a eg:BlankSubject -] eg:isA eg:Blank . +] + eg:isA eg:Blank . diff --git a/test/extra/pretty/inline-blanks-and-lists.ttl b/test/extra/pretty/inline-blanks-and-lists.ttl index c57482d3..3fdfa4ee 100644 --- a/test/extra/pretty/inline-blanks-and-lists.ttl +++ b/test/extra/pretty/inline-blanks-and-lists.ttl @@ -46,7 +46,22 @@ eg:s2 [] , eg:o22 , () , - eg:o23 . + eg:o23 , + [] , + eg:o24 , + [ + a eg:Child + ] , + [] , + eg:o25 , + [ + a eg:FirstChild + ] , [ + a eg:SecondChild + ] , + () , + eg:o26 , + eg:o27 . eg:s3 a eg:Thing ; diff --git a/test/extra/pretty/inline-list-subject.ttl b/test/extra/pretty/inline-list-subject.ttl index a3f8ac18..7591f0e1 100644 --- a/test/extra/pretty/inline-list-subject.ttl +++ b/test/extra/pretty/inline-list-subject.ttl @@ -3,4 +3,5 @@ ( eg:item1 eg:item2 -) eg:isA eg:List . +) + eg:isA eg:List . diff --git a/test/extra/pretty/list-subject-with-extras.ttl b/test/extra/pretty/list-subject-with-extras.ttl new file mode 100644 index 00000000..dcfb8753 --- /dev/null +++ b/test/extra/pretty/list-subject-with-extras.ttl @@ -0,0 +1,9 @@ +@prefix eg: <http://example.org/> . + +( + "apple" + "banana" + "cherry" +) + eg:with eg:someProperties ; + a eg:ExampleList . diff --git a/test/extra/pretty/list-subject-with-list-extras.ttl b/test/extra/pretty/list-subject-with-list-extras.ttl new file mode 100644 index 00000000..0a0cd0e0 --- /dev/null +++ b/test/extra/pretty/list-subject-with-list-extras.ttl @@ -0,0 +1,12 @@ +@prefix eg: <http://example.org/> . + +( + "apple" + "banana" + "cherry" +) + eg:list ( + "asparagus" + "beet" + "carrot" + ) . diff --git a/test/extra/pretty/list-subject.ttl b/test/extra/pretty/list-subject.ttl index 927f56f3..eb1c7a2e 100644 --- a/test/extra/pretty/list-subject.ttl +++ b/test/extra/pretty/list-subject.ttl @@ -4,4 +4,5 @@ "apple" "banana" "cherry" -) a eg:ExampleList . +) + a eg:ExampleList . diff --git a/test/extra/pretty/manifest.ttl b/test/extra/pretty/manifest.ttl index 6921b741..6422c9e0 100644 --- a/test/extra/pretty/manifest.ttl +++ b/test/extra/pretty/manifest.ttl @@ -25,12 +25,15 @@ <#list-in-object> <#list-object> <#list-subject> + <#list-subject-with-extras> + <#list-subject-with-list-extras> <#local-name-escapes> <#long-string-escapes> <#long-string-quotes> <#many-objects> <#named-graph> <#nested-list-object> + <#nested-list-object-with-empty-lists> <#relative-uris> <#short-string-escapes> <#uri-escapes> @@ -145,6 +148,18 @@ mf:name "list-subject" ; mf:result <list-subject.ttl> . +<#list-subject-with-extras> + a rdft:TestTurtleEval ; + mf:action <list-subject-with-extras.ttl> ; + mf:name "list-subject-with-extras" ; + mf:result <list-subject-with-extras.ttl> . + +<#list-subject-with-list-extras> + a rdft:TestTurtleEval ; + mf:action <list-subject-with-list-extras.ttl> ; + mf:name "list-subject-with-list-extras" ; + mf:result <list-subject-with-list-extras.ttl> . + <#local-name-escapes> a rdft:TestTurtleEval ; mf:action <local-name-escapes.ttl> ; @@ -181,6 +196,12 @@ mf:name "nested-list-object" ; mf:result <nested-list-object.ttl> . +<#nested-list-object-with-empty-lists> + a rdft:TestTurtleEval ; + mf:action <nested-list-object-with-empty-lists.ttl> ; + mf:name "nested-list-object-with-empty-lists" ; + mf:result <nested-list-object-with-empty-lists.ttl> . + <#nested-list-subject> a rdft:TestTurtleEval ; mf:action <nested-list-subject.ttl> ; diff --git a/test/extra/pretty/nested-list-object-with-empty-lists.ttl b/test/extra/pretty/nested-list-object-with-empty-lists.ttl new file mode 100644 index 00000000..4760fd2b --- /dev/null +++ b/test/extra/pretty/nested-list-object-with-empty-lists.ttl @@ -0,0 +1,11 @@ +@prefix eg: <http://example.org/> . + +eg:s + eg:list ( + ( + () + ) + ( + () + ) + ) . diff --git a/test/extra/pretty/nested-list-object.ttl b/test/extra/pretty/nested-list-object.ttl index d2177ba3..c4b1898f 100644 --- a/test/extra/pretty/nested-list-object.ttl +++ b/test/extra/pretty/nested-list-object.ttl @@ -5,7 +5,8 @@ eg:s ( eg:l1e1 eg:l1e2 - ) ( + ) + ( eg:l2e1 eg:l2e2 ) diff --git a/test/extra/pretty/nested-list-subject.ttl b/test/extra/pretty/nested-list-subject.ttl index 128197c0..b32aa133 100644 --- a/test/extra/pretty/nested-list-subject.ttl +++ b/test/extra/pretty/nested-list-subject.ttl @@ -4,8 +4,10 @@ ( eg:l1e1 eg:l1e2 - ) ( + ) + ( eg:l2e1 eg:l2e2 ) -) a eg:ExampleList . +) + a eg:ExampleList . |