git.iko.soy/typeable/pandoc
on master help sign in
Changed markdown citation tests.

Now the tests are produced in HTML format (so we can see all formatting). Also, we produce them in three different style, chicago-author-date, ieee, and mhra.

commit3c7c1d8574667d183514d87684edd5f1cd886509 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 22 Nov 2010, 22:54 (16 years ago) parent8e71b5b
5 files changed+240−43
tests/RunTests.hs+2−3 tests/markdown-citations.chicago-author-date.html+56 tests/markdown-citations.ieee.html+56 tests/markdown-citations.mhra.html+126 tests/markdown-citations.plain−40
tests/RunTests.hs+2−3
@@ -106,7 +106,7 @@ main = do
106106 "latex-reader.latex" "latex-reader.native"
107107 r11 <- runTest "native reader" ["-r", "native", "-w", "native", "-s"]
108108 "testsuite.native" "testsuite.native"
109− r14 <- runTest "markdown reader (citations)" ["-r", "markdown", "-w", "plain", "--bibliography", "biblio.bib", "--csl", "chicago-author-date.csl"] "markdown-citations.txt" "markdown-citations.plain"
109+ 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"]
110110 r12s <- if runLhsTests
111111 then mapM runLhsWriterTest lhsWriterFormats
112112 else putStrLn "Skipping lhs writer tests because they presuppose highlighting support" >> return []
@@ -121,8 +121,7 @@ main = do
121121 , r9 -- html
122122 , r10 -- latex
123123 , r11 -- native
124− , r14 -- citations
125− ] ++ r12s ++ r13s
124+ ] ++ r12s ++ r13s ++ r14s
126125 if all id results
127126 then do
128127 putStrLn "\nAll tests passed."
tests/markdown-citations.chicago-author-date.htmlnew file+56
@@ -0,0 +1,56 @@
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.ieee.htmlnew file+56
@@ -0,0 +1,56 @@
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.mhra.htmlnew file+126
@@ -0,0 +1,126 @@
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.plaindeleted−40
@@ -1,40 +0,0 @@
1−Pandoc with citeproc-hs
2−=======================
3−
4−[@nonexistent]
5−
6−@nonexistent
7−
8−Doe (2005) says blah. Doe (2005, 30) says blah. Doe
9−(2005, 30, with suffix) says blah. Doe
10−(2005; 2006, 30; see also Doe and Roe 2007) says blah.
11−
12−In a note.[^1] A citation group
13−(see Doe 2005, 34-35; also Doe and Roe 2007, chap. 3). Another one
14−(see Doe 2005, 34-35). And another one in a note.[^2] Citation with
15−a suffix and locator (Doe 2005, 33, 35-37, and nowhere else).
16−Citation with suffix only (Doe 2005, and nowhere else).
17−
18−Now some modifiers.[^3]
19−
20−References
21−==========
22−
23−Doe, John. 2005. First Book. Cambridge: Cambridge University
24−Press.
25−
26−---. 2006. Article. Journal of Generic Studies 6: 33-34.
27−
28−Doe, John, and Jenny Roe. 2007. Why Water Is Wet. In Third Book,
29−ed. Sam Smith. Oxford: Oxford University Press.
30−
31−[^1]:
32− A citation without locators (Doe and Roe 2007).
33−
34−[^2]:
35− Some citations
36− (see Doe 2006, chap. 3; Doe and Roe 2007; Doe 2005).
37−
38−[^3]:
39− Like a citation without author: (2005), and now Doe with a locator
40− (2006, 44).