From 11f438ed9161a7dbb5de685fd7f3f18b1942b16e Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Wed, 20 Dec 2017 17:17:26 +0200 Subject: Add simple framework for running parser fixtures (#668) * Add simple framework for running parser fixtures * Compatible with tree-diff-0.0.0.1 * Use parseParas to parse fixtures This allows to test all syntactic constructs available in haddock markup. --- haddock-library/fixtures/examples/identifier.input | 1 + haddock-library/fixtures/examples/identifier.parsed | 1 + haddock-library/fixtures/examples/identifierBackticks.input | 1 + haddock-library/fixtures/examples/identifierBackticks.parsed | 1 + haddock-library/fixtures/examples/url.input | 1 + haddock-library/fixtures/examples/url.parsed | 4 ++++ haddock-library/fixtures/examples/urlLabel.input | 1 + haddock-library/fixtures/examples/urlLabel.parsed | 5 +++++ 8 files changed, 15 insertions(+) create mode 100644 haddock-library/fixtures/examples/identifier.input create mode 100644 haddock-library/fixtures/examples/identifier.parsed create mode 100644 haddock-library/fixtures/examples/identifierBackticks.input create mode 100644 haddock-library/fixtures/examples/identifierBackticks.parsed create mode 100644 haddock-library/fixtures/examples/url.input create mode 100644 haddock-library/fixtures/examples/url.parsed create mode 100644 haddock-library/fixtures/examples/urlLabel.input create mode 100644 haddock-library/fixtures/examples/urlLabel.parsed (limited to 'haddock-library/fixtures/examples') diff --git a/haddock-library/fixtures/examples/identifier.input b/haddock-library/fixtures/examples/identifier.input new file mode 100644 index 00000000..c2c4af01 --- /dev/null +++ b/haddock-library/fixtures/examples/identifier.input @@ -0,0 +1 @@ +'foo' diff --git a/haddock-library/fixtures/examples/identifier.parsed b/haddock-library/fixtures/examples/identifier.parsed new file mode 100644 index 00000000..3405a5c9 --- /dev/null +++ b/haddock-library/fixtures/examples/identifier.parsed @@ -0,0 +1 @@ +DocParagraph (DocIdentifier "foo") diff --git a/haddock-library/fixtures/examples/identifierBackticks.input b/haddock-library/fixtures/examples/identifierBackticks.input new file mode 100644 index 00000000..347253a0 --- /dev/null +++ b/haddock-library/fixtures/examples/identifierBackticks.input @@ -0,0 +1 @@ +`foo` diff --git a/haddock-library/fixtures/examples/identifierBackticks.parsed b/haddock-library/fixtures/examples/identifierBackticks.parsed new file mode 100644 index 00000000..3405a5c9 --- /dev/null +++ b/haddock-library/fixtures/examples/identifierBackticks.parsed @@ -0,0 +1 @@ +DocParagraph (DocIdentifier "foo") diff --git a/haddock-library/fixtures/examples/url.input b/haddock-library/fixtures/examples/url.input new file mode 100644 index 00000000..5bfed0a1 --- /dev/null +++ b/haddock-library/fixtures/examples/url.input @@ -0,0 +1 @@ + diff --git a/haddock-library/fixtures/examples/url.parsed b/haddock-library/fixtures/examples/url.parsed new file mode 100644 index 00000000..0fbbbb30 --- /dev/null +++ b/haddock-library/fixtures/examples/url.parsed @@ -0,0 +1,4 @@ +DocParagraph + (DocHyperlink + Hyperlink + {hyperlinkLabel = Nothing, hyperlinkUrl = "http://example.com/"}) diff --git a/haddock-library/fixtures/examples/urlLabel.input b/haddock-library/fixtures/examples/urlLabel.input new file mode 100644 index 00000000..729812e8 --- /dev/null +++ b/haddock-library/fixtures/examples/urlLabel.input @@ -0,0 +1 @@ + diff --git a/haddock-library/fixtures/examples/urlLabel.parsed b/haddock-library/fixtures/examples/urlLabel.parsed new file mode 100644 index 00000000..d7e3a76c --- /dev/null +++ b/haddock-library/fixtures/examples/urlLabel.parsed @@ -0,0 +1,5 @@ +DocParagraph + (DocHyperlink + Hyperlink + {hyperlinkLabel = Just "some link", + hyperlinkUrl = "http://example.com/"}) -- cgit v1.2.3