From 1c082131014e579b587f8bb8b89f3c999e22f4ed Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 3 Apr 2023 09:00:18 -0400 Subject: Add a simple abbreviation test suite --- test/extra/abbreviate/README.md | 6 ++++++ test/extra/abbreviate/collapse-graphs.nq | 6 ++++++ test/extra/abbreviate/collapse-graphs.trig | 18 ++++++++++++++++ test/extra/abbreviate/collapse-predicates.nt | 6 ++++++ test/extra/abbreviate/collapse-predicates.ttl | 7 ++++++ test/extra/abbreviate/collapse-subjects.nt | 6 ++++++ test/extra/abbreviate/collapse-subjects.ttl | 11 ++++++++++ test/extra/abbreviate/manifest.ttl | 31 +++++++++++++++++++++++++++ 8 files changed, 91 insertions(+) create mode 100644 test/extra/abbreviate/README.md create mode 100644 test/extra/abbreviate/collapse-graphs.nq create mode 100644 test/extra/abbreviate/collapse-graphs.trig create mode 100644 test/extra/abbreviate/collapse-predicates.nt create mode 100644 test/extra/abbreviate/collapse-predicates.ttl create mode 100644 test/extra/abbreviate/collapse-subjects.nt create mode 100644 test/extra/abbreviate/collapse-subjects.ttl create mode 100644 test/extra/abbreviate/manifest.ttl (limited to 'test/extra') diff --git a/test/extra/abbreviate/README.md b/test/extra/abbreviate/README.md new file mode 100644 index 00000000..ac887dc1 --- /dev/null +++ b/test/extra/abbreviate/README.md @@ -0,0 +1,6 @@ +Abbreviate Test Suite +===================== + +This suite tests abbreviating "flat" NTriples/NQuads input by eliding subjects +or predicates in Turtle/Trig. Pretty-printing is more limited here since there +is no context information to determine if blank nodes are anonymous. diff --git a/test/extra/abbreviate/collapse-graphs.nq b/test/extra/abbreviate/collapse-graphs.nq new file mode 100644 index 00000000..40ccc7f9 --- /dev/null +++ b/test/extra/abbreviate/collapse-graphs.nq @@ -0,0 +1,6 @@ + . + . + . + . + . + . diff --git a/test/extra/abbreviate/collapse-graphs.trig b/test/extra/abbreviate/collapse-graphs.trig new file mode 100644 index 00000000..5bdf55ce --- /dev/null +++ b/test/extra/abbreviate/collapse-graphs.trig @@ -0,0 +1,18 @@ + + { + + ; + ; + . +} + + { + + . +} + + { + + ; + . +} diff --git a/test/extra/abbreviate/collapse-predicates.nt b/test/extra/abbreviate/collapse-predicates.nt new file mode 100644 index 00000000..b1128902 --- /dev/null +++ b/test/extra/abbreviate/collapse-predicates.nt @@ -0,0 +1,6 @@ + . + . + . + . + . + . diff --git a/test/extra/abbreviate/collapse-predicates.ttl b/test/extra/abbreviate/collapse-predicates.ttl new file mode 100644 index 00000000..a0bbd881 --- /dev/null +++ b/test/extra/abbreviate/collapse-predicates.ttl @@ -0,0 +1,7 @@ + + , + , + ; + ; + , + . diff --git a/test/extra/abbreviate/collapse-subjects.nt b/test/extra/abbreviate/collapse-subjects.nt new file mode 100644 index 00000000..fa5fd630 --- /dev/null +++ b/test/extra/abbreviate/collapse-subjects.nt @@ -0,0 +1,6 @@ + . + . + . + . + . + . diff --git a/test/extra/abbreviate/collapse-subjects.ttl b/test/extra/abbreviate/collapse-subjects.ttl new file mode 100644 index 00000000..b1c86f59 --- /dev/null +++ b/test/extra/abbreviate/collapse-subjects.ttl @@ -0,0 +1,11 @@ + + ; + ; + . + + + . + + + ; + . diff --git a/test/extra/abbreviate/manifest.ttl b/test/extra/abbreviate/manifest.ttl new file mode 100644 index 00000000..ddcfdf03 --- /dev/null +++ b/test/extra/abbreviate/manifest.ttl @@ -0,0 +1,31 @@ +@prefix mf: . +@prefix rdfs: . +@prefix rdft: . +@prefix serd: . + +<> + a mf:Manifest ; + rdfs:comment "Serd abbreviation test cases" ; + mf:entries ( + <#collapse-graphs> + <#collapse-predicates> + <#collapse-subjects> + ) . + +<#collapse-graphs> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "collapse-graphs" ; + mf:result . + +<#collapse-predicates> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "collapse-predicates" ; + mf:result . + +<#collapse-subjects> + a rdft:TestTurtleEval ; + mf:action ; + mf:name "collapse-subjects" ; + mf:result . -- cgit v1.2.1