diff options
author | David Robillard <d@drobilla.net> | 2023-03-27 15:42:27 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-04-05 09:41:43 -0400 |
commit | e970e63146fb5d8de511104eba7aef5319e8653b (patch) | |
tree | 9f8e24335b84012ec0473e62301f37491c31cdb9 /test/good | |
parent | 68c1a2e677775e489cff4beb38ef17c1efeae4e3 (diff) | |
download | serd-e970e63146fb5d8de511104eba7aef5319e8653b.tar.gz serd-e970e63146fb5d8de511104eba7aef5319e8653b.tar.bz2 serd-e970e63146fb5d8de511104eba7aef5319e8653b.zip |
Add pretty-printing test suite
The earlier "test" was just hitting the code without actually checking the
output. This new suite is a set of pretty-printed documents which serd must
reproduce exactly to pass. This should make it easy to add cases in the
future, since each case is just a document, as it should look.
Diffstat (limited to 'test/good')
-rw-r--r-- | test/good/manifest.ttl | 7 | ||||
-rw-r--r-- | test/good/test-pretty.nt | 46 | ||||
-rw-r--r-- | test/good/test-pretty.ttl | 44 |
3 files changed, 0 insertions, 97 deletions
diff --git a/test/good/manifest.ttl b/test/good/manifest.ttl index 25359fdc..aeb90340 100644 --- a/test/good/manifest.ttl +++ b/test/good/manifest.ttl @@ -44,7 +44,6 @@ <#test-num> <#test-out-of-range-unicode> <#test-prefix> - <#test-pretty> <#test-quote-escapes> <#test-rel> <#test-semi-dot> @@ -276,12 +275,6 @@ mf:action <test-prefix.ttl> ; mf:result <test-prefix.nt> . -<#test-pretty> - rdf:type rdft:TestTurtleEval ; - mf:name "test-pretty" ; - mf:action <test-pretty.ttl> ; - mf:result <test-pretty.nt> . - <#test-quote-escapes> rdf:type rdft:TestTurtleEval ; mf:name "test-quote-escapes" ; diff --git a/test/good/test-pretty.nt b/test/good/test-pretty.nt deleted file mode 100644 index 9251563a..00000000 --- a/test/good/test-pretty.nt +++ /dev/null @@ -1,46 +0,0 @@ -<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.org/isA> <http://example.org/List> . -_:b1 <http://example.org/isA> <http://example.org/Blank> . -<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.org/sameAs> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> . -_:b2 <http://example.org/sameAs> _:b3 . -_:b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "apple" . -_:b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b5 . -_:b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "banana" . -_:b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b6 . -_:b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "pear" . -_:b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> . -_:b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/List> . -_:b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b8 . -_:b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.org/a> . -_:b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b9 . -_:b9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.org/b> . -_:b9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> . -_:b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b10 . -_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b11 . -_:b11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.org/c> . -_:b11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b12 . -_:b12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.org/d> . -_:b12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> . -_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> . -_:b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/List> . -_:b13 <http://example.org/list> _:b14 . -_:b14 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "apple" . -_:b14 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b15 . -_:b15 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "banana" . -_:b15 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b16 . -_:b16 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "pear" . -_:b16 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> . -_:b17 <http://example.org/a> <http://example.org/b> . -_:b17 <http://example.org/a> <http://example.org/c> . -_:b17 <http://example.org/a> <http://example.org/d> . -_:b18 <http://example.org/a> _:b19 . -_:b19 <http://example.org/b> <http://example.org/c> . -_:b19 <http://example.org/d> <http://example.org/e> . -_:b18 <http://example.org/a> _:b20 . -_:b20 <http://example.org/f> <http://example.org/g> . -_:b21 <http://example.org/list> _:b22 . -_:b22 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b23 . -_:b23 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Apple> . -_:b22 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b24 . -_:b24 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b25 . -_:b25 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Banana> . -_:b24 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> . diff --git a/test/good/test-pretty.ttl b/test/good/test-pretty.ttl deleted file mode 100644 index 4eb7204f..00000000 --- a/test/good/test-pretty.ttl +++ /dev/null @@ -1,44 +0,0 @@ -@prefix : <http://example.org/> . - -() :isA :List . - -[] :isA :Blank . - -() :sameAs () . - -[] :sameAs [] . - -( - "apple" - "banana" - "pear" -) a :List . - -( - (:a :b) - (:c :d) -) a :List . - -[] - :list ( - "apple" - "banana" - "pear" - ) . - -[] - :a :b , :c , :d . - -[] - :a [ - :b :c ; - :d :e ; - ] , [ - :f :g - ] . - -[] - :list ( - [ a :Apple ] - [ a :Banana ] - ) .
\ No newline at end of file |