git.iko.soy/typeable/pandoc
on master help sign in
Revamped tests, using markdown output instead of HTML.

This is easier to inspect.

commit68d38db19468c6a9bb7a4676dd072e7f81f619f2 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 28 Nov 2010, 10:02 (16 years ago) parent61b1611
8 files changed+136−257
tests/RunTests.hs+1−1 tests/markdown-citations.chicago-author-date.html−56 tests/markdown-citations.chicago-author-date.txt+32 tests/markdown-citations.ieee.html−56 tests/markdown-citations.ieee.txt+32 tests/markdown-citations.mhra.html−126 tests/markdown-citations.mhra.txt+56 tests/markdown-citations.txt+15−18
tests/RunTests.hs+1−1
@@ -107,7 +107,7 @@ main = do
107107 "latex-reader.latex" "latex-reader.native"
108108 r11 <- runTest "native reader" ["-r", "native", "-w", "native", "-s"]
109109 "testsuite.native" "testsuite.native"
110− r14s <- mapM (\style -> runTest ("markdown reader (citations) (" ++ style ++ ")") ["-r", "markdown", "-w", "html", "--bibliography", "biblio.bib", "--csl", style ++ ".csl"] "markdown-citations.txt" ("markdown-citations." ++ style ++ ".html")) ["chicago-author-date","ieee","mhra"]
110+ r14s <- mapM (\style -> runTest ("markdown reader (citations) (" ++ style ++ ")") ["-r", "markdown", "-w", "markdown", "--bibliography", "biblio.bib", "--csl", style ++ ".csl", "--no-wrap"] "markdown-citations.txt" ("markdown-citations." ++ style ++ ".txt")) ["chicago-author-date","ieee","mhra"]
111111 r12s <- if runLhsTests
112112 then mapM runLhsWriterTest lhsWriterFormats
113113 else putStrLn "Skipping lhs writer tests because they presuppose highlighting support" >> return []
tests/markdown-citations.chicago-author-date.htmldeleted−56
@@ -1,56 +0,0 @@
1−<h1 id="pandoc-with-citeproc-hs"
2−>Pandoc with citeproc-hs</h1
3−><p
4−>[@nonexistent]</p
5−><p
6−>@nonexistent</p
7−><p
8−>Doe (2005) says blah. Doe (2005, 30) says blah. Doe (2005, 30, with suffix) says blah. Doe (2005; 2006, 30; see also Doe and Roe 2007) says blah.</p
9−><p
10−>In a note.<sup
11− ><a href="#fn1" class="footnoteRef" id="fnref1"
12− >1</a
13− ></sup
14− > A citation group (see Doe 2005, 34–35; also Doe and Roe 2007, chap. 3). Another one (see Doe 2005, 34–35). And another one in a note.<sup
15− ><a href="#fn2" class="footnoteRef" id="fnref2"
16− >2</a
17− ></sup
18− > Citation with a suffix and locator (Doe 2005, 33, 35–37, and nowhere else). Citation with suffix only (Doe 2005, and nowhere else).</p
19−><p
20−>Now some modifiers.<sup
21− ><a href="#fn3" class="footnoteRef" id="fnref3"
22− >3</a
23− ></sup
24− ></p
25−><h1 id="references"
26−>References</h1
27−><p
28−>Doe, John. 2005. <em
29− >First Book</em
30− >. Cambridge: Cambridge University Press.</p
31−><p
32−>---. 2006. Article. <em
33− >Journal of Generic Studies</em
34− > 6: 33–34.</p
35−><p
36−>Doe, John, and Jenny Roe. 2007. Why Water Is Wet. In <em
37− >Third Book</em
38− >, ed. Sam Smith. Oxford: Oxford University Press.</p
39−><div class="footnotes"
40−><hr
41− /><ol
42− ><li id="fn1"
43− ><p
44− >A citation without locators (Doe and Roe 2007). <a href="#fnref1" class="footnoteBackLink" title="Jump back to footnote 1">↩</a></p
45− ></li
46− ><li id="fn2"
47− ><p
48− >Some citations (see Doe 2006, chap. 3; Doe and Roe 2007; Doe 2005). <a href="#fnref2" class="footnoteBackLink" title="Jump back to footnote 2">↩</a></p
49− ></li
50− ><li id="fn3"
51− ><p
52− >Like a citation without author: (2005), and now Doe with a locator (2006, 44). <a href="#fnref3" class="footnoteBackLink" title="Jump back to footnote 3">↩</a></p
53− ></li
54− ></ol
55− ></div
56−>
tests/markdown-citations.chicago-author-date.txtnew file+32
@@ -0,0 +1,32 @@
1+# Pandoc with citeproc-hs
2+
3+- [@nonexistent]
4+- @nonexistent
5+- Doe (2005) says blah.
6+- Doe (2005, 30) says blah.
7+- Doe (2005, 30, with suffix) says blah.
8+- Doe (2005; 2006, 30; see also Doe and Roe 2007) says blah.
9+- In a note.[^1]
10+- A citation group (see Doe 2005, 34–35; also Doe and Roe 2007, chap. 3).
11+- Another one (see Doe 2005, 34–35).
12+- And another one in a note.[^2]
13+- Citation with a suffix and locator (Doe 2005, 33, 35–37, and nowhere else).
14+- Citation with suffix only (Doe 2005, and nowhere else).
15+- Now some modifiers.[^3]
16+
17+# References
18+
19+Doe, John. 2005. *First Book*. Cambridge: Cambridge University Press.
20+
21+---. 2006. Article. *Journal of Generic Studies* 6: 33–34.
22+
23+Doe, John, and Jenny Roe. 2007. Why Water Is Wet. In *Third Book*, ed. Sam Smith. Oxford: Oxford University Press.
24+
25+[^1]:
26+ A citation without locators (Doe and Roe 2007).
27+
28+[^2]:
29+ Some citations (see Doe 2006, chap. 3; Doe and Roe 2007; Doe 2005).
30+
31+[^3]:
32+ Like a citation without author: (2005), and now Doe with a locator (2006, 44).
tests/markdown-citations.ieee.htmldeleted−56
@@ -1,56 +0,0 @@
1−<h1 id="pandoc-with-citeproc-hs"
2−>Pandoc with citeproc-hs</h1
3−><p
4−>[@nonexistent]</p
5−><p
6−>@nonexistent</p
7−><p
8−>Reference [1] says blah. Reference [1] says blah. Reference [1] says blah. Reference [1] says blah.</p
9−><p
10−>In a note.<sup
11− ><a href="#fn1" class="footnoteRef" id="fnref1"
12− >1</a
13− ></sup
14− > A citation group [1],[3]. Another one [1]. And another one in a note.<sup
15− ><a href="#fn2" class="footnoteRef" id="fnref2"
16− >2</a
17− ></sup
18− > Citation with a suffix and locator [1]. Citation with suffix only [1].</p
19−><p
20−>Now some modifiers.<sup
21− ><a href="#fn3" class="footnoteRef" id="fnref3"
22− >3</a
23− ></sup
24− ></p
25−><h1 id="references"
26−>References</h1
27−><p
28−>[1] J. Doe, <em
29− >First Book</em
30− >, Cambridge: Cambridge University Press, 2005.</p
31−><p
32−>[2] J. Doe, “Article”, <em
33− >Journal of Generic Studies</em
34− >, vol. 6, 2006, pp. 33–34.</p
35−><p
36−>[3] J. Doe and J. Roe, “Why Water Is Wet”, <em
37− >Third Book</em
38− >, Smith, S., Ed., Oxford: Oxford University Press, 2007.</p
39−><div class="footnotes"
40−><hr
41− /><ol
42− ><li id="fn1"
43− ><p
44− >A citation without locators [3]. <a href="#fnref1" class="footnoteBackLink" title="Jump back to footnote 1">↩</a></p
45− ></li
46− ><li id="fn2"
47− ><p
48− >Some citations [1]-[3]. <a href="#fnref2" class="footnoteBackLink" title="Jump back to footnote 2">↩</a></p
49− ></li
50− ><li id="fn3"
51− ><p
52− >Like a citation without author: [1], and now Doe with a locator [2]. <a href="#fnref3" class="footnoteBackLink" title="Jump back to footnote 3">↩</a></p
53− ></li
54− ></ol
55− ></div
56−>
tests/markdown-citations.ieee.txtnew file+32
@@ -0,0 +1,32 @@
1+# Pandoc with citeproc-hs
2+
3+- [@nonexistent]
4+- @nonexistent
5+- Reference [1] says blah.
6+- Reference [1] says blah.
7+- Reference [1] says blah.
8+- Reference [1] says blah.
9+- In a note.[^1]
10+- A citation group [1],[3].
11+- Another one [1].
12+- And another one in a note.[^2]
13+- Citation with a suffix and locator [1].
14+- Citation with suffix only [1].
15+- Now some modifiers.[^3]
16+
17+# References
18+
19+[1] J. Doe, *First Book*, Cambridge: Cambridge University Press, 2005.
20+
21+[2] J. Doe, “Article”, *Journal of Generic Studies*, vol. 6, 2006, pp. 33-34.
22+
23+[3] J. Doe and J. Roe, “Why Water Is Wet”, *Third Book*, Smith, S., Ed., Oxford: Oxford University Press, 2007.
24+
25+[^1]:
26+ A citation without locators [3].
27+
28+[^2]:
29+ Some citations [1]-[3].
30+
31+[^3]:
32+ Like a citation without author: [1], and now Doe with a locator [2].
tests/markdown-citations.mhra.htmldeleted−126
@@ -1,126 +0,0 @@
1−<h1 id="pandoc-with-citeproc-hs"
2−>Pandoc with citeproc-hs</h1
3−><p
4−>[@nonexistent]</p
5−><p
6−>@nonexistent</p
7−><p
8−>John Doe<sup
9− ><a href="#fn1" class="footnoteRef" id="fnref1"
10− >1</a
11− ></sup
12− > says blah. Doe<sup
13− ><a href="#fn2" class="footnoteRef" id="fnref2"
14− >2</a
15− ></sup
16− > says blah. Doe<sup
17− ><a href="#fn3" class="footnoteRef" id="fnref3"
18− >3</a
19− ></sup
20− > says blah. Doe<sup
21− ><a href="#fn4" class="footnoteRef" id="fnref4"
22− >4</a
23− ></sup
24− > says blah.</p
25−><p
26−>In a note.<sup
27− ><a href="#fn5" class="footnoteRef" id="fnref5"
28− >5</a
29− ></sup
30− > A citation group.<sup
31− ><a href="#fn6" class="footnoteRef" id="fnref6"
32− >6</a
33− ></sup
34− > Another one.<sup
35− ><a href="#fn7" class="footnoteRef" id="fnref7"
36− >7</a
37− ></sup
38− > And another one in a note.<sup
39− ><a href="#fn8" class="footnoteRef" id="fnref8"
40− >8</a
41− ></sup
42− > Citation with a suffix and locator.<sup
43− ><a href="#fn9" class="footnoteRef" id="fnref9"
44− >9</a
45− ></sup
46− > Citation with suffix only.<sup
47− ><a href="#fn10" class="footnoteRef" id="fnref10"
48− >10</a
49− ></sup
50− ></p
51−><p
52−>Now some modifiers.<sup
53− ><a href="#fn11" class="footnoteRef" id="fnref11"
54− >11</a
55− ></sup
56− ></p
57−><h1 id="references"
58−>References</h1
59−><p
60−>Doe, John, ‘Article’, <em
61− >Journal of Generic Studies</em
62− >, 6 (2006), 33–34.</p
63−><p
64−>---, <em
65− >First Book</em
66− > (Cambridge: Cambridge University Press, 2005).</p
67−><p
68−>Doe, John, and Jenny Roe, ‘Why Water Is Wet’, in <em
69− >Third Book</em
70− >, ed by Sam Smith (Oxford: Oxford University Press, 2007).</p
71−><div class="footnotes"
72−><hr
73− /><ol
74− ><li id="fn1"
75− ><p
76− ><em
77− >First Book</em
78− > (Cambridge: Cambridge University Press, 2005). <a href="#fnref1" class="footnoteBackLink" title="Jump back to footnote 1">↩</a></p
79− ></li
80− ><li id="fn2"
81− ><p
82− >First Book, p. 30. <a href="#fnref2" class="footnoteBackLink" title="Jump back to footnote 2">↩</a></p
83− ></li
84− ><li id="fn3"
85− ><p
86− >First Book, p. 30, with suffix. <a href="#fnref3" class="footnoteBackLink" title="Jump back to footnote 3">↩</a></p
87− ></li
88− ><li id="fn4"
89− ><p
90− >First Book; ‘Article’, <em
91− >Journal of Generic Studies</em
92− >, 6 (2006), 33–34 (p. 30); see also John Doe and Jenny Roe, ‘Why Water Is Wet’, in <em
93− >Third Book</em
94− >, ed by Sam Smith (Oxford: Oxford University Press, 2007). <a href="#fnref4" class="footnoteBackLink" title="Jump back to footnote 4">↩</a></p
95− ></li
96− ><li id="fn5"
97− ><p
98− >A citation without locators Doe and Roe. <a href="#fnref5" class="footnoteBackLink" title="Jump back to footnote 5">↩</a></p
99− ></li
100− ><li id="fn6"
101− ><p
102− >See Doe, First Book, pp. 34–35; also Doe and Roe, chap. 3. <a href="#fnref6" class="footnoteBackLink" title="Jump back to footnote 6">↩</a></p
103− ></li
104− ><li id="fn7"
105− ><p
106− >See Doe, First Book, pp. 34–35. <a href="#fnref7" class="footnoteBackLink" title="Jump back to footnote 7">↩</a></p
107− ></li
108− ><li id="fn8"
109− ><p
110− >Some citations see Doe, Article, 33–34 (chap. 3); Doe and Roe; Doe, First Book. <a href="#fnref8" class="footnoteBackLink" title="Jump back to footnote 8">↩</a></p
111− ></li
112− ><li id="fn9"
113− ><p
114− >Doe, First Book, pp. 33, 35–37, and nowhere else. <a href="#fnref9" class="footnoteBackLink" title="Jump back to footnote 9">↩</a></p
115− ></li
116− ><li id="fn10"
117− ><p
118− >Doe, First Book, and nowhere else. <a href="#fnref10" class="footnoteBackLink" title="Jump back to footnote 10">↩</a></p
119− ></li
120− ><li id="fn11"
121− ><p
122− >Like a citation without author: First Book, and now Doe with a locator Article, 33–34 (p. 44). <a href="#fnref11" class="footnoteBackLink" title="Jump back to footnote 11">↩</a></p
123− ></li
124− ></ol
125− ></div
126−>
tests/markdown-citations.mhra.txtnew file+56
@@ -0,0 +1,56 @@
1+# Pandoc with citeproc-hs
2+
3+- [@nonexistent]
4+- @nonexistent
5+- John Doe[^1] says blah.
6+- Doe[^2] says blah.
7+- Doe[^3] says blah.
8+- Doe[^4] says blah.
9+- In a note.[^5]
10+- A citation group.[^6]
11+- Another one.[^7]
12+- And another one in a note.[^8]
13+- Citation with a suffix and locator.[^9]
14+- Citation with suffix only.[^10]
15+- Now some modifiers.[^11]
16+
17+# References
18+
19+Doe, John, ‘Article’, *Journal of Generic Studies*, 6 (2006), 33-34.
20+
21+---, *First Book* (Cambridge: Cambridge University Press, 2005).
22+
23+Doe, John, and Jenny Roe, ‘Why Water Is Wet’, in *Third Book*, ed by Sam Smith (Oxford: Oxford University Press, 2007).
24+
25+[^1]:
26+ *First Book* (Cambridge: Cambridge University Press, 2005).
27+
28+[^2]:
29+ First Book, p. 30.
30+
31+[^3]:
32+ First Book, p. 30, with suffix.
33+
34+[^4]:
35+ First Book; ‘Article’, *Journal of Generic Studies*, 6 (2006), 33-34 (p. 30); see also John Doe and Jenny Roe, ‘Why Water Is Wet’, in *Third Book*, ed by Sam Smith (Oxford: Oxford University Press, 2007).
36+
37+[^5]:
38+ A citation without locators Doe and Roe.
39+
40+[^6]:
41+ See Doe, First Book, pp. 34-35; also Doe and Roe, chap. 3.
42+
43+[^7]:
44+ See Doe, First Book, pp. 34-35.
45+
46+[^8]:
47+ Some citations see Doe, Article, 33-34 (chap. 3); Doe and Roe; Doe, First Book.
48+
49+[^9]:
50+ Doe, First Book, pp. 33, 35-37, and nowhere else.
51+
52+[^10]:
53+ Doe, First Book, and nowhere else.
54+
55+[^11]:
56+ Like a citation without author: First Book, and now Doe with a locator Article, 33-34 (p. 44).
tests/markdown-citations.txt+15−18
@@ -1,22 +1,19 @@
11# Pandoc with citeproc-hs
22
3−[@nonexistent]
4−
5−@nonexistent
6−
7−@item1 says blah.
8−@item1 [p. 30] says blah.
9−@item1 [p. 30, with suffix] says blah.
10−@item1 [-@item2 p. 30; see also @item3] says blah.
11−
12−In a note.[^1] A citation group [see
13−@item1 p. 34-35; also @item3 chap. 3]. Another one [see
14−@item1 p. 34-35]. And another one in a note.[^2]
15−Citation with a suffix and locator [@item1 pp. 33, 35-37,
16−and nowhere else]. Citation with suffix only
17−[@item1, and nowhere else].
18−
19−Now some modifiers.[^3]
3+- [@nonexistent]
4+- @nonexistent
5+- @item1 says blah.
6+- @item1 [p. 30] says blah.
7+- @item1 [p. 30, with suffix] says blah.
8+- @item1 [-@item2 p. 30; see also @item3] says blah.
9+- In a note.[^1]
10+- A citation group [see @item1, p. 34-35; also @item3 chap. 3].
11+- Another one [see
12+ @item1 p. 34-35].
13+- And another one in a note.[^2]
14+- Citation with a suffix and locator [@item1, pp. 33, 35-37, and nowhere else].
15+- Citation with suffix only [@item1, and nowhere else].
16+- Now some modifiers.[^3]
2017
2118[^1]:
2219 A citation without locators [@item3].
@@ -26,7 +23,7 @@ Now some modifiers.[^3]
2623
2724[^3]:
2825 Like a citation without author: [-@item1], and now Doe with a
29− locator [-@item2 p. 44].
26+ locator [-@item2, p. 44].
3027
3128# References
3229