aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-07.out2
-rw-r--r--tests/test-blank-in-list.out4
-rw-r--r--tests/test-blank-in-list.ttl2
-rw-r--r--tests/test-list-in-blank.out6
-rw-r--r--tests/test-list-in-blank.ttl2
-rw-r--r--tests/test-list-subject.out5
-rw-r--r--tests/test-list-subject.ttl1
-rw-r--r--tests/test-pretty.out46
-rw-r--r--tests/test-pretty.ttl44
9 files changed, 111 insertions, 1 deletions
diff --git a/tests/test-07.out b/tests/test-07.out
index 4a4e8ee2..e17cc7be 100644
--- a/tests/test-07.out
+++ b/tests/test-07.out
@@ -1,5 +1,5 @@
+<http://example.org/stuff/1.0/a> <http://example.org/stuff/1.0/b> _:genid1 .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "apple" .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "banana" .
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.org/stuff/1.0/a> <http://example.org/stuff/1.0/b> _:genid1 .
diff --git a/tests/test-blank-in-list.out b/tests/test-blank-in-list.out
new file mode 100644
index 00000000..2e0c0eb0
--- /dev/null
+++ b/tests/test-blank-in-list.out
@@ -0,0 +1,4 @@
+<http://example.org/stuff/1.0/a> <http://example.org/stuff/1.0/b> _:genid1 .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:genid2 .
+_:genid2 <http://example.org/stuff/1.0/c> <http://example.org/stuff/1.0/d> .
+_:genid1 <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/tests/test-blank-in-list.ttl b/tests/test-blank-in-list.ttl
new file mode 100644
index 00000000..5c0b0766
--- /dev/null
+++ b/tests/test-blank-in-list.ttl
@@ -0,0 +1,2 @@
+@prefix : <http://example.org/stuff/1.0/> .
+:a :b ( [ :c :d ] ) .
diff --git a/tests/test-list-in-blank.out b/tests/test-list-in-blank.out
new file mode 100644
index 00000000..76023a8b
--- /dev/null
+++ b/tests/test-list-in-blank.out
@@ -0,0 +1,6 @@
+<http://example.org/stuff/1.0/a> <http://example.org/stuff/1.0/b> _:genid1 .
+_:genid1 <http://example.org/stuff/1.0/c> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "apple" .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid3 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "banana" .
+_:genid3 <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/tests/test-list-in-blank.ttl b/tests/test-list-in-blank.ttl
new file mode 100644
index 00000000..bdf75fce
--- /dev/null
+++ b/tests/test-list-in-blank.ttl
@@ -0,0 +1,2 @@
+@prefix : <http://example.org/stuff/1.0/> .
+:a :b [ :c ( "apple" "banana" ) ] .
diff --git a/tests/test-list-subject.out b/tests/test-list-subject.out
new file mode 100644
index 00000000..e0e7f497
--- /dev/null
+++ b/tests/test-list-subject.out
@@ -0,0 +1,5 @@
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "apple" .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "banana" .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/List> .
diff --git a/tests/test-list-subject.ttl b/tests/test-list-subject.ttl
new file mode 100644
index 00000000..624336ae
--- /dev/null
+++ b/tests/test-list-subject.ttl
@@ -0,0 +1 @@
+("apple" "banana") a <http://example.org/List> . \ No newline at end of file
diff --git a/tests/test-pretty.out b/tests/test-pretty.out
new file mode 100644
index 00000000..c61f7c22
--- /dev/null
+++ b/tests/test-pretty.out
@@ -0,0 +1,46 @@
+<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.org/isA> <http://example.org/List> .
+_:genid1 <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> .
+_:genid2 <http://example.org/sameAs> _:genid3 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "apple" .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid5 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "banana" .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid6 .
+_:genid6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "pear" .
+_:genid6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/List> .
+_:genid7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:genid8 .
+_:genid8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.org/a> .
+_:genid8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid9 .
+_:genid9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.org/b> .
+_:genid9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:genid7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid10 .
+_:genid10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:genid11 .
+_:genid11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.org/c> .
+_:genid11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid12 .
+_:genid12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.org/d> .
+_:genid12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:genid10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:genid7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/List> .
+_:genid13 <http://example.org/list> _:genid14 .
+_:genid14 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "apple" .
+_:genid14 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid15 .
+_:genid15 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "banana" .
+_:genid15 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid16 .
+_:genid16 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "pear" .
+_:genid16 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:genid17 <http://example.org/a> <http://example.org/b> .
+_:genid17 <http://example.org/a> <http://example.org/c> .
+_:genid17 <http://example.org/a> <http://example.org/d> .
+_:genid18 <http://example.org/a> _:genid19 .
+_:genid19 <http://example.org/b> <http://example.org/c> .
+_:genid19 <http://example.org/d> <http://example.org/e> .
+_:genid18 <http://example.org/a> _:genid20 .
+_:genid20 <http://example.org/f> <http://example.org/g> .
+_:genid21 <http://example.org/list> _:genid22 .
+_:genid22 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:genid23 .
+_:genid23 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Apple> .
+_:genid22 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid24 .
+_:genid24 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:genid25 .
+_:genid25 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Banana> .
+_:genid24 <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/tests/test-pretty.ttl b/tests/test-pretty.ttl
new file mode 100644
index 00000000..4eb7204f
--- /dev/null
+++ b/tests/test-pretty.ttl
@@ -0,0 +1,44 @@
+@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