summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2011-12-27 18:08:06 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2011-12-27 18:08:06 -0800
commit70b4ec95e4d1a565d32c074637bc3e3d203ce729 (patch)
tree43e378c838e04f3490d72c0c352541ebcebd45ef
parent35fc88ef93d851b795959a11d99cf7f24203dd71 (diff)
Updated tests.
-rw-r--r--tests/lhs-test.html44
-rw-r--r--tests/lhs-test.html+lhs44
-rw-r--r--tests/lhs-test.latex32
-rw-r--r--tests/writer.html33
4 files changed, 80 insertions, 73 deletions
diff --git a/tests/lhs-test.html b/tests/lhs-test.html
index 268dd9b27..b8f254fed 100644
--- a/tests/lhs-test.html
+++ b/tests/lhs-test.html
@@ -5,35 +5,33 @@
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
- <style type="text/css">
-/*<![CDATA[*/
-table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode, table.sourceCode pre
- { margin: 0; padding: 0; border: 0; vertical-align: baseline; border: none; }
-td.lineNumbers { border-right: 1px solid #AAAAAA; text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px; }
+<style type="text/css">table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
+ margin: 0; padding: 0; vertical-align: baseline; border: none; }
+table.sourceCode { }
+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
-code.sourceCode span.kw { color: #007020; font-weight: bold; }
-code.sourceCode span.dt { color: #902000; }
-code.sourceCode span.dv { color: #40a070; }
-code.sourceCode span.bn { color: #40a070; }
-code.sourceCode span.fl { color: #40a070; }
-code.sourceCode span.ch { color: #4070a0; }
-code.sourceCode span.st { color: #4070a0; }
-code.sourceCode span.co { color: #60a0b0; font-style: italic; }
-code.sourceCode span.ot { color: #007020; }
-code.sourceCode span.al { color: red; font-weight: bold; }
-code.sourceCode span.fu { color: #06287e; }
-code.sourceCode span.re { }
-code.sourceCode span.er { color: red; font-weight: bold; }
-/*]]>*/
- </style>
+code > span.kw { color: #007020; font-weight: bold; }
+code > span.dt { color: #902000; }
+code > span.dv { color: #40a070; }
+code > span.bn { color: #40a070; }
+code > span.fl { color: #40a070; }
+code > span.ch { color: #4070a0; }
+code > span.st { color: #4070a0; }
+code > span.co { color: #60a0b0; font-style: italic; }
+code > span.ot { color: #007020; }
+code > span.al { color: #ff0000; font-weight: bold; }
+code > span.fu { color: #06287e; }
+code > span.er { color: #ff0000; font-weight: bold; }
+</style>
</head>
<body>
<h1 id="lhs-test">lhs test</h1>
<p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p>
-<pre class="sourceCode"><code class="sourceCode haskell"><span class="ot">unsplit </span><span class="ot">::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d<br />unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span> <br /> <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>
+<pre class="sourceCode"><code class="sourceCode"><span class="ot">unsplit ::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d
+unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span>
+ <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>
<p><code>(***)</code> combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).</p>
-<pre><code>f *** g = first f &gt;&gt;&gt; second g
-</code></pre>
+<pre><code>f *** g = first f &gt;&gt;&gt; second g</code></pre>
<p>Block quote:</p>
<blockquote>
<p>foo bar</p>
diff --git a/tests/lhs-test.html+lhs b/tests/lhs-test.html+lhs
index b9413f07a..f0b0f3e15 100644
--- a/tests/lhs-test.html+lhs
+++ b/tests/lhs-test.html+lhs
@@ -5,35 +5,33 @@
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
- <style type="text/css">
-/*<![CDATA[*/
-table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode, table.sourceCode pre
- { margin: 0; padding: 0; border: 0; vertical-align: baseline; border: none; }
-td.lineNumbers { border-right: 1px solid #AAAAAA; text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px; }
+<style type="text/css">table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
+ margin: 0; padding: 0; vertical-align: baseline; border: none; }
+table.sourceCode { }
+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
-code.sourceCode span.kw { color: #007020; font-weight: bold; }
-code.sourceCode span.dt { color: #902000; }
-code.sourceCode span.dv { color: #40a070; }
-code.sourceCode span.bn { color: #40a070; }
-code.sourceCode span.fl { color: #40a070; }
-code.sourceCode span.ch { color: #4070a0; }
-code.sourceCode span.st { color: #4070a0; }
-code.sourceCode span.co { color: #60a0b0; font-style: italic; }
-code.sourceCode span.ot { color: #007020; }
-code.sourceCode span.al { color: red; font-weight: bold; }
-code.sourceCode span.fu { color: #06287e; }
-code.sourceCode span.re { }
-code.sourceCode span.er { color: red; font-weight: bold; }
-/*]]>*/
- </style>
+code > span.kw { color: #007020; font-weight: bold; }
+code > span.dt { color: #902000; }
+code > span.dv { color: #40a070; }
+code > span.bn { color: #40a070; }
+code > span.fl { color: #40a070; }
+code > span.ch { color: #4070a0; }
+code > span.st { color: #4070a0; }
+code > span.co { color: #60a0b0; font-style: italic; }
+code > span.ot { color: #007020; }
+code > span.al { color: #ff0000; font-weight: bold; }
+code > span.fu { color: #06287e; }
+code > span.er { color: #ff0000; font-weight: bold; }
+</style>
</head>
<body>
<h1 id="lhs-test">lhs test</h1>
<p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p>
-<pre class="sourceCode"><code class="sourceCode haskell">&gt; <span class="ot">unsplit </span><span class="ot">::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d<br />&gt; unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span> <br />&gt; <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>
+<pre class="sourceCode"><code class="sourceCode"><span class="fu">&gt;</span><span class="ot"> unsplit ::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d
+<span class="fu">&gt;</span> unsplit <span class="fu">=</span> arr <span class="fu">.</span> <span class="fu">uncurry</span>
+<span class="fu">&gt;</span> <span class="co">-- arr (\op (x,y) -&gt; x `op` y) </span></code></pre>
<p><code>(***)</code> combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).</p>
-<pre><code>f *** g = first f &gt;&gt;&gt; second g
-</code></pre>
+<pre><code>f *** g = first f &gt;&gt;&gt; second g</code></pre>
<p>Block quote:</p>
<blockquote>
<p>foo bar</p>
diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex
index 307fd948f..34b608c6a 100644
--- a/tests/lhs-test.latex
+++ b/tests/lhs-test.latex
@@ -12,6 +12,26 @@
\usepackage[utf8]{inputenc}
\fi
\fi
+\usepackage{color}
+\usepackage{fancyvrb}
+\DefineShortVerb[commandchars=\\\{\}]{\|}
+\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
+% Add ',fontsize=\small' for more characters per line
+\newenvironment{Shaded}{}{}
+\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
+\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}}
+\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
+\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
+\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
+\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
+\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
+\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}}
+\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}}
+\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
+\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}}
+\newcommand{\RegionMarkerTok}[1]{{#1}}
+\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
+\newcommand{\NormalTok}[1]{{#1}}
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
@@ -33,11 +53,13 @@
\texttt{unsplit} is an arrow that takes a pair of values and combines them to
return a single value:
-\begin{verbatim}
-unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
-unsplit = arr . uncurry
- -- arr (\op (x,y) -> x `op` y)
-\end{verbatim}
+\begin{Shaded}
+\begin{Highlighting}[]
+\OtherTok{unsplit ::} \NormalTok{(}\DataTypeTok{Arrow} \NormalTok{a) }\OtherTok{=>} \NormalTok{(b }\OtherTok{->} \NormalTok{c }\OtherTok{->} \NormalTok{d) }\OtherTok{->} \NormalTok{a (b, c) d}
+\NormalTok{unsplit }\FunctionTok{=} \NormalTok{arr }\FunctionTok{.} \FunctionTok{uncurry}
+ \CommentTok{-- arr (\textbackslash{}op (x,y) -> x `op` y) }
+\end{Highlighting}
+\end{Shaded}
\texttt{(***)} combines two arrows into a new arrow by running the two arrows
on a pair of values (one arrow on the first item of the pair and one arrow on
the second item of the pair).
diff --git a/tests/writer.html b/tests/writer.html
index f38ad5079..0aaa6a1b3 100644
--- a/tests/writer.html
+++ b/tests/writer.html
@@ -45,8 +45,7 @@
<p>Code in a block quote:</p>
<pre><code>sub status {
print &quot;working&quot;;
-}
-</code></pre>
+}</code></pre>
<p>A list:</p>
<ol style="list-style-type: decimal">
<li>item one</li>
@@ -71,13 +70,11 @@ sub status {
print &quot;working&quot;;
}
-this code block is indented by one tab
-</code></pre>
+this code block is indented by one tab</code></pre>
<p>And:</p>
<pre><code> this code block is indented by two tabs
-These should not be escaped: \$ \\ \&gt; \[ \{
-</code></pre>
+These should not be escaped: \$ \\ \&gt; \[ \{</code></pre>
<hr />
<h1 id="lists">Lists</h1>
<h2 id="unordered">Unordered</h2>
@@ -274,8 +271,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
</dd>
<dt><em>orange</em></dt>
<dd><p>orange fruit</p>
-<pre><code>{ orange code block }
-</code></pre>
+<pre><code>{ orange code block }</code></pre>
<blockquote>
<p>orange block quote</p>
</blockquote>
@@ -358,11 +354,9 @@ foo
<p>This should be a code block, though:</p>
<pre><code>&lt;div&gt;
foo
-&lt;/div&gt;
-</code></pre>
+&lt;/div&gt;</code></pre>
<p>As should this:</p>
-<pre><code>&lt;div&gt;foo&lt;/div&gt;
-</code></pre>
+<pre><code>&lt;div&gt;foo&lt;/div&gt;</code></pre>
<p>Now, nested:</p>
<div>
<div>
@@ -387,14 +381,12 @@ Blah
-->
<p>Code block:</p>
-<pre><code>&lt;!-- Comment --&gt;
-</code></pre>
+<pre><code>&lt;!-- Comment --&gt;</code></pre>
<p>Just plain comment, with trailing spaces on the line:</p>
<!-- foo -->
<p>Code:</p>
-<pre><code>&lt;hr /&gt;
-</code></pre>
+<pre><code>&lt;hr /&gt;</code></pre>
<p>Hr’s:</p>
<hr>
@@ -517,8 +509,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'Email link'+'<\/'+'a'+'>')
<p>Indented <a href="/url">twice</a>.</p>
<p>Indented <a href="/url">thrice</a>.</p>
<p>This should [not][] be a link.</p>
-<pre><code>[not]: /url
-</code></pre>
+<pre><code>[not]: /url</code></pre>
<p>Foo <a href="/url/" title="Title with &quot;quotes&quot; inside">bar</a>.</p>
<p>Foo <a href="/url/" title="Title with &quot;quote&quot; inside">biz</a>.</p>
<h2 id="with-ampersands">With ampersands</h2>
@@ -543,8 +534,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
<p>Blockquoted: <a href="http://example.com/"><code class="url">http://example.com/</code></a></p>
</blockquote>
<p>Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code></p>
-<pre><code>or here: &lt;http://example.com/&gt;
-</code></pre>
+<pre><code>or here: &lt;http://example.com/&gt;</code></pre>
<hr />
<h1 id="images">Images</h1>
<p>From “Voyage dans la Lune” by Georges Melies (1902):</p>
@@ -568,8 +558,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. <a href="#fnref1" class="footnoteBackLink">↩</a></p></li>
<li id="fn2"><p>Here’s the long note. This one contains multiple blocks.</p>
<p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p>
-<pre><code> { &lt;code&gt; }
-</code></pre>
+<pre><code> { &lt;code&gt; }</code></pre>
<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. <a href="#fnref2" class="footnoteBackLink">↩</a></p></li>
<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text]. <a href="#fnref3" class="footnoteBackLink">↩</a></p></li>
<li id="fn4"><p>In quote. <a href="#fnref4" class="footnoteBackLink">↩</a></p></li>