From 1409f161793a289819df1f31eccb579b71f45475 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 Aug 2021 22:28:59 -0400 Subject: Fix pretty-printing nested empty lists and add 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 from a model 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. --- test/good/manifest.ttl | 7 ---- test/good/pretty.trig | 98 ----------------------------------------------- test/good/test-pretty.nt | 46 ---------------------- test/good/test-pretty.ttl | 44 --------------------- 4 files changed, 195 deletions(-) delete mode 100644 test/good/pretty.trig delete mode 100644 test/good/test-pretty.nt delete mode 100644 test/good/test-pretty.ttl (limited to 'test/good') diff --git a/test/good/manifest.ttl b/test/good/manifest.ttl index b546b9f7..0198a8c8 100644 --- a/test/good/manifest.ttl +++ b/test/good/manifest.ttl @@ -46,7 +46,6 @@ <#test-non-curie-uri> <#test-num> <#test-prefix> - <#test-pretty> <#test-rel> <#test-semi-dot> <#test-uri-escape> @@ -276,12 +275,6 @@ mf:action ; mf:result . -<#test-pretty> - rdf:type rdft:TestTurtleEval ; - mf:name "test-pretty" ; - mf:action ; - mf:result . - <#test-rel> rdf:type rdft:TestTurtleEval ; mf:name "test-rel" ; diff --git a/test/good/pretty.trig b/test/good/pretty.trig deleted file mode 100644 index 140769ce..00000000 --- a/test/good/pretty.trig +++ /dev/null @@ -1,98 +0,0 @@ -@prefix : . -@prefix rdf: . - -:a - :b :c , - :d , - :e ; - :f :g , - :h . - -( - 1 -) - :isA :List . - -[] - :isA :Blank . - -( - 2 -) - :sameAs ( - 2 - ) . - -[] - :sameAs [] . - -( - 1 - 2 -) - a :List ; - rdf:value 3 . - -( - ( - 3 - ) - ( - 4 - ) -) - a :NestedList ; - :sum 7 . - -[ - a :BlankSubject -] - a rdf:Resource . - -[ - a :BlankSubject -] . - -[] - :blank [ - :nestedEmptyBlank [] ; - :nestedNonEmptyBlanks [ - rdf:value 1 - ] , [ - rdf:value 2 - ] - ] ; - :lists ( - 3 - 4 - ) , ( - 5 - 6 - ) , ( - [ - rdf:value 7 - ] - [ - rdf:value 8 - ] - ) . - -:s - a :Thing ; - :predicate1 :object1 , - [ - a :SubThing ; - :predicate2 :object2 - ] , [ - a :OtherSubThing ; - :p3 :o3 - ] ; - :p4 :o4 . - -eg:graph { - :a - :b :c ; - :d [ - :e :f - ] . -} 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 @@ - . -_:b1 . - . -_:b2 _:b3 . -_:b4 "apple" . -_:b4 _:b5 . -_:b5 "banana" . -_:b5 _:b6 . -_:b6 "pear" . -_:b6 . -_:b4 . -_:b7 _:b8 . -_:b8 . -_:b8 _:b9 . -_:b9 . -_:b9 . -_:b7 _:b10 . -_:b10 _:b11 . -_:b11 . -_:b11 _:b12 . -_:b12 . -_:b12 . -_:b10 . -_:b7 . -_:b13 _:b14 . -_:b14 "apple" . -_:b14 _:b15 . -_:b15 "banana" . -_:b15 _:b16 . -_:b16 "pear" . -_:b16 . -_:b17 . -_:b17 . -_:b17 . -_:b18 _:b19 . -_:b19 . -_:b19 . -_:b18 _:b20 . -_:b20 . -_:b21 _:b22 . -_:b22 _:b23 . -_:b23 . -_:b22 _:b24 . -_:b24 _:b25 . -_:b25 . -_:b24 . 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 : . - -() :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 -- cgit v1.2.1