aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/block-cluster_scope.native74
-rw-r--r--test/block-cluster_scope.plain.html1
-rw-r--r--test/block-siblings_scope.native30
-rw-r--r--test/block-tree_scope.native48
-rw-r--r--test/block_scope.md.md2
-rw-r--r--test/block_scope.native30
-rw-r--r--test/block_scope_list.native24
-rw-r--r--test/ex_paragraph.native59
-rw-r--r--test/ex_title_and_list.native67
-rw-r--r--test/link_definition_scope.native37
-rw-r--r--test/span_scope.md.md4
-rw-r--r--test/span_scope.native49
12 files changed, 421 insertions, 4 deletions
diff --git a/test/block-cluster_scope.native b/test/block-cluster_scope.native
new file mode 100644
index 0000000..66e5204
--- /dev/null
+++ b/test/block-cluster_scope.native
@@ -0,0 +1,74 @@
+[ RawBlock (Format "sem-md") ".schema:Group"
+, Header 1 ( "" , [] , [] ) [ Str "People" ]
+, Header
+ 2 ( "" , [] , [] ) [ Str "Manu" , Space , Str "Sporny" ]
+, Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Manu"
+ , Space
+ , Str "Sporny."
+ ]
+, Header
+ 2 ( "" , [] , [] ) [ Str "Thomas" , Space , Str "Francart" ]
+, Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Thomas"
+ , Space
+ , Str "Francart."
+ ]
+, Para
+ [ Str "I"
+ , Space
+ , Str "once"
+ , Space
+ , Str "read"
+ , Space
+ , Str "this:"
+ ]
+, BlockQuote
+ [ RawBlock (Format "sem-md") "=<#manu>"
+ , Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Manu"
+ , Space
+ , Str "Sporny."
+ ]
+ , Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "give"
+ , Space
+ , Str "me"
+ , Space
+ , Str "a"
+ , Space
+ , Str "ring."
+ ]
+ ]
+, Para
+ [ Str "Should"
+ , Space
+ , Str "I"
+ , Space
+ , Str "call"
+ , Space
+ , Str "him?"
+ ]
+]
diff --git a/test/block-cluster_scope.plain.html b/test/block-cluster_scope.plain.html
index c121d82..d6a042a 100644
--- a/test/block-cluster_scope.plain.html
+++ b/test/block-cluster_scope.plain.html
@@ -1,4 +1,3 @@
-<p>{.schema:Group}</p>
<h1>People</h1>
<h2>Manu Sporny</h2>
<p>My name is Manu Sporny.</p>
diff --git a/test/block-siblings_scope.native b/test/block-siblings_scope.native
new file mode 100644
index 0000000..4a28670
--- /dev/null
+++ b/test/block-siblings_scope.native
@@ -0,0 +1,30 @@
+[ Header 1 ( "" , [] , [] ) [ Str "People" ]
+, RawBlock (Format "sem-md") ".schema:Person"
+, Header
+ 2 ( "" , [] , [] ) [ Str "Manu" , Space , Str "Sporny" ]
+, Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Manu"
+ , Space
+ , Str "Sporny."
+ ]
+, Header
+ 2 ( "" , [] , [] ) [ Str "Thomas" , Space , Str "Francart" ]
+, Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Thomas"
+ , Space
+ , Str "Francart."
+ ]
+, Header 1 ( "" , [] , [] ) [ Str "Animals" ]
+]
diff --git a/test/block-tree_scope.native b/test/block-tree_scope.native
new file mode 100644
index 0000000..7224300
--- /dev/null
+++ b/test/block-tree_scope.native
@@ -0,0 +1,48 @@
+[ Header 1 ( "" , [] , [] ) [ Str "People" ]
+, Header
+ 2
+ ( "" , [] , [] )
+ [ RawInline (Format "sem-md") "=<#manu>"
+ , Str "Manu"
+ , Space
+ , Str "Sporny"
+ ]
+, Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Manu"
+ , Space
+ , Str "Sporny,"
+ , SoftBreak
+ , Str "and"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "give"
+ , Space
+ , Str "me"
+ , Space
+ , Str "a"
+ , Space
+ , Str "ring."
+ ]
+, Header
+ 2 ( "" , [] , [] ) [ Str "Thomas" , Space , Str "Francart" ]
+, Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Thomas"
+ , Space
+ , Str "Francart."
+ ]
+]
diff --git a/test/block_scope.md.md b/test/block_scope.md.md
index c0150ad..8024675 100644
--- a/test/block_scope.md.md
+++ b/test/block_scope.md.md
@@ -1,3 +1,3 @@
You can give me a ring.
-You can give me a ring {=<#manu>}.
+You can give me a ring {=\<#manu\>}.
diff --git a/test/block_scope.native b/test/block_scope.native
new file mode 100644
index 0000000..e2eb12a
--- /dev/null
+++ b/test/block_scope.native
@@ -0,0 +1,30 @@
+[ Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "give"
+ , Space
+ , Str "me"
+ , Space
+ , Str "a"
+ , Space
+ , Str "ring."
+ , RawInline (Format "sem-md") "=<#manu>"
+ ]
+, Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "give"
+ , Space
+ , Str "me"
+ , Space
+ , Str "a"
+ , Space
+ , Str "ring"
+ , Space
+ , Str "{=<#manu>}."
+ ]
+]
diff --git a/test/block_scope_list.native b/test/block_scope_list.native
new file mode 100644
index 0000000..6ab7e0d
--- /dev/null
+++ b/test/block_scope_list.native
@@ -0,0 +1,24 @@
+[ BulletList
+ [ [ Plain
+ [ Str "Thomas"
+ , Space
+ , Str "Francart"
+ , RawInline (Format "sem-md") "foaf:name"
+ ]
+ ]
+ , [ Plain
+ [ Str "39"
+ , RawInline (Format "sem-md") "foaf:age"
+ ]
+ ]
+ , [ Plain
+ [ Str "Semantic"
+ , Space
+ , Str "Web"
+ , Space
+ , Str "Consultant"
+ , RawInline (Format "sem-md") "rdfs:comment"
+ ]
+ ]
+ ]
+]
diff --git a/test/ex_paragraph.native b/test/ex_paragraph.native
new file mode 100644
index 0000000..1f6ecc2
--- /dev/null
+++ b/test/ex_paragraph.native
@@ -0,0 +1,59 @@
+[ Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , SoftBreak
+ , Str "Manu"
+ , Space
+ , Str "Sporny"
+ , RawInline (Format "sem-md") ":name"
+ , SoftBreak
+ , Str "and"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "give"
+ , Space
+ , Str "me"
+ , Space
+ , Str "a"
+ , Space
+ , Str "ring"
+ , Space
+ , Str "via"
+ , SoftBreak
+ , Str "1-800-555-0199"
+ , RawInline (Format "sem-md") ":telephone"
+ , Str "."
+ , SoftBreak
+ , Image
+ ( "" , [] , [] )
+ []
+ ( "http://manu.sporny.org/images/manu.png" , "" )
+ , RawInline (Format "sem-md") ":image"
+ , SoftBreak
+ , Str "My"
+ , Space
+ , Str "favorite"
+ , Space
+ , Str "animal"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Liger"
+ , RawInline (Format "sem-md") "ov:preferredAnimal"
+ , Str "."
+ , SoftBreak
+ , Space
+ , RawInline (Format "sem-md") ".:Person"
+ ]
+, RawBlock (Format "sem-md") "{schema}: @default"
+, RawBlock
+ (Format "sem-md") "{ov}: http://open.vocab.org/terms/"
+]
diff --git a/test/ex_title_and_list.native b/test/ex_title_and_list.native
new file mode 100644
index 0000000..bee50b3
--- /dev/null
+++ b/test/ex_title_and_list.native
@@ -0,0 +1,67 @@
+[ Header
+ 2
+ ( "" , [] , [] )
+ [ RawInline (Format "sem-md") "schema:name" ]
+, Header
+ 2
+ ( "" , [] , [] )
+ [ Str "Specification" , Space , Str "meeting" ]
+, BulletList
+ [ [ Plain
+ [ Str "Date:"
+ , Space
+ , Str "11/10"
+ , RawInline (Format "sem-md") "schema:startDate"
+ ]
+ ]
+ , [ Plain
+ [ Str "Place:"
+ , Space
+ , Str "Our"
+ , Space
+ , Str "office,"
+ , Space
+ , Str "Street"
+ , Space
+ , Str "name,"
+ , Space
+ , Str "Paris"
+ , RawInline (Format "sem-md") "schema:location"
+ ]
+ ]
+ , [ Plain
+ [ Str "Meeting"
+ , Space
+ , Str "participants:"
+ , RawInline (Format "sem-md") "schema:attendee"
+ ]
+ , BulletList
+ [ [ Plain [ Str "Alice" ] ]
+ , [ Plain [ Str "Bob" ] ]
+ , [ Plain
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Tim" ]
+ ( "https://www.wikidata.org/entity/Q80" , "" )
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Description:"
+ , Space
+ , Str "Some"
+ , Space
+ , Str "information"
+ , Space
+ , Str "not"
+ , Space
+ , Str "annotated"
+ ]
+ ]
+ ]
+, Header
+ 2 ( "" , [] , [] ) [ Str "Launch" , Space , Str "party" ]
+, Para [ Str "(TODO)" ]
+, RawBlock (Format "sem-md") "{schema}: @default"
+]
diff --git a/test/link_definition_scope.native b/test/link_definition_scope.native
new file mode 100644
index 0000000..f221d81
--- /dev/null
+++ b/test/link_definition_scope.native
@@ -0,0 +1,37 @@
+[ Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , SoftBreak
+ , Str "Manu"
+ , Space
+ , Str "Sporny"
+ , SoftBreak
+ , Str "and"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "give"
+ , Space
+ , Str "me"
+ , Space
+ , Str "a"
+ , Space
+ , Str "ring"
+ , Space
+ , Str "via"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "1-800-555-0199" ]
+ ( "tel:+1-800-555-0199"
+ , "make a phone call to Manu Sporny"
+ )
+ , Str "."
+ ]
+, RawBlock (Format "sem-md") "schema:telephone"
+]
diff --git a/test/span_scope.md.md b/test/span_scope.md.md
index 7ecdf46..7cb5036 100644
--- a/test/span_scope.md.md
+++ b/test/span_scope.md.md
@@ -1,4 +1,4 @@
My name is Manu Sporny.
-My name is **Manu [Sporny]**.
-My name is [Manu Sporny] {schema:name}.
+My name is **Manu \[Sporny\]**.
+My name is \[Manu Sporny\] {schema:name}.
My name is Manu Sporny{schema:name}.
diff --git a/test/span_scope.native b/test/span_scope.native
new file mode 100644
index 0000000..f6a3a06
--- /dev/null
+++ b/test/span_scope.native
@@ -0,0 +1,49 @@
+[ Para
+ [ Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Manu"
+ , Space
+ , Str "Sporny"
+ , RawInline (Format "sem-md") "schema:name"
+ , Str "."
+ , LineBreak
+ , Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "Manu" , Space , Str "[Sporny]" ]
+ , RawInline (Format "sem-md") "schema:name"
+ , Str "."
+ , LineBreak
+ , Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "[Manu"
+ , Space
+ , Str "Sporny]"
+ , Space
+ , Str "{schema:name}"
+ , Str "."
+ , LineBreak
+ , Str "My"
+ , Space
+ , Str "name"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Manu"
+ , Space
+ , Str "Sporny"
+ , Str "{schema:name}"
+ , Str "."
+ ]
+]