aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Old.hs4
-rw-r--r--tests/opml-reader.native66
-rw-r--r--tests/opml-reader.opml91
3 files changed, 161 insertions, 0 deletions
diff --git a/tests/Tests/Old.hs b/tests/Tests/Old.hs
index 9e7493504..c22fa9830 100644
--- a/tests/Tests/Old.hs
+++ b/tests/Tests/Old.hs
@@ -124,6 +124,10 @@ tests = [ testGroup "markdown"
, test "reader" ["-r", "mediawiki", "-w", "native", "-s"]
"mediawiki-reader.wiki" "mediawiki-reader.native"
]
+ , testGroup "opml"
+ [ test "reader" ["-r", "opml", "-w", "native", "-s"]
+ "opml-reader.opml" "opml-reader.native"
+ ]
, testGroup "other writers" $ map (\f -> testGroup f $ writerTests f)
[ "opendocument" , "context" , "texinfo"
, "man" , "plain" , "rtf", "org", "asciidoc"
diff --git a/tests/opml-reader.native b/tests/opml-reader.native
new file mode 100644
index 000000000..8a627c025
--- /dev/null
+++ b/tests/opml-reader.native
@@ -0,0 +1,66 @@
+Pandoc (Meta {docTitle = [Str "states.opml"], docAuthors = [[Str "Dave",Space,Str "Winer"]], docDate = [Str "Thu,",Space,Str "14",Space,Str "Jul",Space,Str "2005",Space,Str "23:41:05",Space,Str "GMT"]})
+[Header 1 ("",[],[]) [Str "United",Space,Str "States"]
+,Header 2 ("",[],[]) [Str "Far",Space,Str "West"]
+,Header 3 ("",[],[]) [Str "Alaska"]
+,Header 3 ("",[],[]) [Str "California"]
+,Header 3 ("",[],[]) [Str "Hawaii"]
+,Header 3 ("",[],[]) [Strong [Str "Nevada"]]
+,Para [Str "I",Space,Str "lived",Space,Str "here",Space,Emph [Str "once"],Str "."]
+,Para [Str "Loved",Space,Str "it."]
+,Header 4 ("",[],[]) [Link [Str "Reno"] ("http://www.reno.gov","")]
+,Header 4 ("",[],[]) [Str "Las",Space,Str "Vegas"]
+,Header 4 ("",[],[]) [Str "Ely"]
+,Header 4 ("",[],[]) [Str "Gerlach"]
+,Header 3 ("",[],[]) [Str "Oregon"]
+,Header 3 ("",[],[]) [Str "Washington"]
+,Header 2 ("",[],[]) [Str "Great",Space,Str "Plains"]
+,Header 3 ("",[],[]) [Str "Kansas"]
+,Header 3 ("",[],[]) [Str "Nebraska"]
+,Header 3 ("",[],[]) [Str "North",Space,Str "Dakota"]
+,Header 3 ("",[],[]) [Str "Oklahoma"]
+,Header 3 ("",[],[]) [Str "South",Space,Str "Dakota"]
+,Header 2 ("",[],[]) [Str "Mid",Str "-",Str "Atlantic"]
+,Header 3 ("",[],[]) [Str "Delaware"]
+,Header 3 ("",[],[]) [Str "Maryland"]
+,Header 3 ("",[],[]) [Str "New",Space,Str "Jersey"]
+,Header 3 ("",[],[]) [Str "New",Space,Str "York"]
+,Header 3 ("",[],[]) [Str "Pennsylvania"]
+,Header 2 ("",[],[]) [Str "Midwest"]
+,Header 3 ("",[],[]) [Str "Illinois"]
+,Header 3 ("",[],[]) [Str "Indiana"]
+,Header 3 ("",[],[]) [Str "Iowa"]
+,Header 3 ("",[],[]) [Str "Kentucky"]
+,Header 3 ("",[],[]) [Str "Michigan"]
+,Header 3 ("",[],[]) [Str "Minnesota"]
+,Header 3 ("",[],[]) [Str "Missouri"]
+,Header 3 ("",[],[]) [Str "Ohio"]
+,Header 3 ("",[],[]) [Str "West",Space,Str "Virginia"]
+,Header 3 ("",[],[]) [Str "Wisconsin"]
+,Header 2 ("",[],[]) [Str "Mountains"]
+,Header 3 ("",[],[]) [Str "Colorado"]
+,Header 3 ("",[],[]) [Str "Idaho"]
+,Header 3 ("",[],[]) [Str "Montana"]
+,Header 3 ("",[],[]) [Str "Utah"]
+,Header 3 ("",[],[]) [Str "Wyoming"]
+,Header 2 ("",[],[]) [Str "New",Space,Str "England"]
+,Header 3 ("",[],[]) [Str "Connecticut"]
+,Header 3 ("",[],[]) [Str "Maine"]
+,Header 3 ("",[],[]) [Str "Massachusetts"]
+,Header 3 ("",[],[]) [Str "New",Space,Str "Hampshire"]
+,Header 3 ("",[],[]) [Str "Rhode",Space,Str "Island"]
+,Header 3 ("",[],[]) [Str "Vermont"]
+,Header 2 ("",[],[]) [Str "South"]
+,Header 3 ("",[],[]) [Str "Alabama"]
+,Header 3 ("",[],[]) [Str "Arkansas"]
+,Header 3 ("",[],[]) [Str "Florida"]
+,Header 3 ("",[],[]) [Str "Georgia"]
+,Header 3 ("",[],[]) [Str "Louisiana"]
+,Header 3 ("",[],[]) [Str "Mississippi"]
+,Header 3 ("",[],[]) [Str "North",Space,Str "Carolina"]
+,Header 3 ("",[],[]) [Str "South",Space,Str "Carolina"]
+,Header 3 ("",[],[]) [Str "Tennessee"]
+,Header 3 ("",[],[]) [Str "Virginia"]
+,Header 2 ("",[],[]) [Str "Southwest"]
+,Header 3 ("",[],[]) [Str "Arizona"]
+,Header 3 ("",[],[]) [Str "New",Space,Str "Mexico"]
+,Header 3 ("",[],[]) [Str "Texas"]]
diff --git a/tests/opml-reader.opml b/tests/opml-reader.opml
new file mode 100644
index 000000000..54dd592ea
--- /dev/null
+++ b/tests/opml-reader.opml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<opml version="2.0">
+ <head>
+ <title>states.opml</title>
+ <dateCreated>Tue, 15 Mar 2005 16:35:45 GMT</dateCreated>
+ <dateModified>Thu, 14 Jul 2005 23:41:05 GMT</dateModified>
+ <ownerName>Dave Winer</ownerName>
+ <ownerEmail>dave@scripting.com</ownerEmail>
+ <expansionState>1, 6, 13, 16, 18, 20</expansionState>
+ <vertScrollState>1</vertScrollState>
+ <windowTop>106</windowTop>
+ <windowLeft>106</windowLeft>
+ <windowBottom>558</windowBottom>
+ <windowRight>479</windowRight>
+ </head>
+ <body>
+ <outline text="United States">
+ <outline text="Far West">
+ <outline text="Alaska"/>
+ <outline text="California"/>
+ <outline text="Hawaii"/>
+ <outline text="&lt;strong&gt;Nevada&lt;/strong&gt;" _note="I lived here *once*.&#10;&#10;Loved it.">
+ <outline text="Reno" created="Tue, 12 Jul 2005 23:56:35 GMT" type="link" url="http://www.reno.gov"/>
+ <outline text="Las Vegas" created="Tue, 12 Jul 2005 23:56:37 GMT"/>
+ <outline text="Ely" created="Tue, 12 Jul 2005 23:56:39 GMT"/>
+ <outline text="Gerlach" created="Tue, 12 Jul 2005 23:56:47 GMT"/>
+ </outline>
+ <outline text="Oregon"/>
+ <outline text="Washington"/>
+ </outline>
+ <outline text="Great Plains">
+ <outline text="Kansas"/>
+ <outline text="Nebraska"/>
+ <outline text="North Dakota"/>
+ <outline text="Oklahoma"/>
+ <outline text="South Dakota"/>
+ </outline>
+ <outline text="Mid-Atlantic">
+ <outline text="Delaware"/>
+ <outline text="Maryland"/>
+ <outline text="New Jersey"/>
+ <outline text="New York"/>
+ <outline text="Pennsylvania"/>
+ </outline>
+ <outline text="Midwest">
+ <outline text="Illinois"/>
+ <outline text="Indiana"/>
+ <outline text="Iowa"/>
+ <outline text="Kentucky"/>
+ <outline text="Michigan"/>
+ <outline text="Minnesota"/>
+ <outline text="Missouri"/>
+ <outline text="Ohio"/>
+ <outline text="West Virginia"/>
+ <outline text="Wisconsin"/>
+ </outline>
+ <outline text="Mountains">
+ <outline text="Colorado"/>
+ <outline text="Idaho"/>
+ <outline text="Montana"/>
+ <outline text="Utah"/>
+ <outline text="Wyoming"/>
+ </outline>
+ <outline text="New England">
+ <outline text="Connecticut"/>
+ <outline text="Maine"/>
+ <outline text="Massachusetts"/>
+ <outline text="New Hampshire"/>
+ <outline text="Rhode Island"/>
+ <outline text="Vermont"/>
+ </outline>
+ <outline text="South">
+ <outline text="Alabama"/>
+ <outline text="Arkansas"/>
+ <outline text="Florida"/>
+ <outline text="Georgia"/>
+ <outline text="Louisiana"/>
+ <outline text="Mississippi"/>
+ <outline text="North Carolina"/>
+ <outline text="South Carolina"/>
+ <outline text="Tennessee"/>
+ <outline text="Virginia"/>
+ </outline>
+ <outline text="Southwest">
+ <outline text="Arizona"/>
+ <outline text="New Mexico"/>
+ <outline text="Texas"/>
+ </outline>
+ </outline>
+ </body>
+ </opml>