From 68d38db19468c6a9bb7a4676dd072e7f81f619f2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 28 Nov 2010 10:02:40 -0800 Subject: Revamped tests, using markdown output instead of HTML. This is easier to inspect. --- tests/RunTests.hs | 2 +- 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 | 33 +++--- 8 files changed, 136 insertions(+), 257 deletions(-) delete mode 100644 tests/markdown-citations.chicago-author-date.html create mode 100644 tests/markdown-citations.chicago-author-date.txt delete mode 100644 tests/markdown-citations.ieee.html create mode 100644 tests/markdown-citations.ieee.txt delete mode 100644 tests/markdown-citations.mhra.html create mode 100644 tests/markdown-citations.mhra.txt (limited to 'tests') diff --git a/tests/RunTests.hs b/tests/RunTests.hs index 5c6e136e3..50ebcfc8e 100644 --- a/tests/RunTests.hs +++ b/tests/RunTests.hs @@ -107,7 +107,7 @@ main = do "latex-reader.latex" "latex-reader.native" r11 <- runTest "native reader" ["-r", "native", "-w", "native", "-s"] "testsuite.native" "testsuite.native" - 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"] + 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"] r12s <- if runLhsTests then mapM runLhsWriterTest lhsWriterFormats else putStrLn "Skipping lhs writer tests because they presuppose highlighting support" >> return [] diff --git a/tests/markdown-citations.chicago-author-date.html b/tests/markdown-citations.chicago-author-date.html deleted file mode 100644 index 05434493f..000000000 --- a/tests/markdown-citations.chicago-author-date.html +++ /dev/null @@ -1,56 +0,0 @@ -

Pandoc with citeproc-hs

[@nonexistent]

@nonexistent

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.

In a note.1 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.2 Citation with a suffix and locator (Doe 2005, 33, 35–37, and nowhere else). Citation with suffix only (Doe 2005, and nowhere else).

Now some modifiers.3

References

Doe, John. 2005. First Book. Cambridge: Cambridge University Press.

---. 2006. Article. Journal of Generic Studies 6: 33–34.

Doe, John, and Jenny Roe. 2007. Why Water Is Wet. In Third Book, ed. Sam Smith. Oxford: Oxford University Press.


  1. A citation without locators (Doe and Roe 2007).

  2. Some citations (see Doe 2006, chap. 3; Doe and Roe 2007; Doe 2005).

  3. Like a citation without author: (2005), and now Doe with a locator (2006, 44).

diff --git a/tests/markdown-citations.chicago-author-date.txt b/tests/markdown-citations.chicago-author-date.txt new file mode 100644 index 000000000..42a28c5d2 --- /dev/null +++ b/tests/markdown-citations.chicago-author-date.txt @@ -0,0 +1,32 @@ +# Pandoc with citeproc-hs + +- [@nonexistent] +- @nonexistent +- 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. +- In a note.[^1] +- 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.[^2] +- Citation with a suffix and locator (Doe 2005, 33, 35–37, and nowhere else). +- Citation with suffix only (Doe 2005, and nowhere else). +- Now some modifiers.[^3] + +# References + +Doe, John. 2005. *First Book*. Cambridge: Cambridge University Press. + +---. 2006. Article. *Journal of Generic Studies* 6: 33–34. + +Doe, John, and Jenny Roe. 2007. Why Water Is Wet. In *Third Book*, ed. Sam Smith. Oxford: Oxford University Press. + +[^1]: + A citation without locators (Doe and Roe 2007). + +[^2]: + Some citations (see Doe 2006, chap. 3; Doe and Roe 2007; Doe 2005). + +[^3]: + Like a citation without author: (2005), and now Doe with a locator (2006, 44). diff --git a/tests/markdown-citations.ieee.html b/tests/markdown-citations.ieee.html deleted file mode 100644 index f076a4675..000000000 --- a/tests/markdown-citations.ieee.html +++ /dev/null @@ -1,56 +0,0 @@ -

Pandoc with citeproc-hs

[@nonexistent]

@nonexistent

Reference [1] says blah. Reference [1] says blah. Reference [1] says blah. Reference [1] says blah.

In a note.1 A citation group [1],[3]. Another one [1]. And another one in a note.2 Citation with a suffix and locator [1]. Citation with suffix only [1].

Now some modifiers.3

References

[1] J. Doe, First Book, Cambridge: Cambridge University Press, 2005.

[2] J. Doe, “Article”, Journal of Generic Studies, vol. 6, 2006, pp. 33–34.

[3] J. Doe and J. Roe, “Why Water Is Wet”, Third Book, Smith, S., Ed., Oxford: Oxford University Press, 2007.


  1. A citation without locators [3].

  2. Some citations [1]-[3].

  3. Like a citation without author: [1], and now Doe with a locator [2].

diff --git a/tests/markdown-citations.ieee.txt b/tests/markdown-citations.ieee.txt new file mode 100644 index 000000000..de5c30b33 --- /dev/null +++ b/tests/markdown-citations.ieee.txt @@ -0,0 +1,32 @@ +# Pandoc with citeproc-hs + +- [@nonexistent] +- @nonexistent +- Reference [1] says blah. +- Reference [1] says blah. +- Reference [1] says blah. +- Reference [1] says blah. +- In a note.[^1] +- A citation group [1],[3]. +- Another one [1]. +- And another one in a note.[^2] +- Citation with a suffix and locator [1]. +- Citation with suffix only [1]. +- Now some modifiers.[^3] + +# References + +[1] J. Doe, *First Book*, Cambridge: Cambridge University Press, 2005. + +[2] J. Doe, “Article”, *Journal of Generic Studies*, vol. 6, 2006, pp. 33-34. + +[3] J. Doe and J. Roe, “Why Water Is Wet”, *Third Book*, Smith, S., Ed., Oxford: Oxford University Press, 2007. + +[^1]: + A citation without locators [3]. + +[^2]: + Some citations [1]-[3]. + +[^3]: + Like a citation without author: [1], and now Doe with a locator [2]. diff --git a/tests/markdown-citations.mhra.html b/tests/markdown-citations.mhra.html deleted file mode 100644 index 2964ed8b7..000000000 --- a/tests/markdown-citations.mhra.html +++ /dev/null @@ -1,126 +0,0 @@ -

Pandoc with citeproc-hs

[@nonexistent]

@nonexistent

John Doe1 says blah. Doe2 says blah. Doe3 says blah. Doe4 says blah.

In a note.5 A citation group.6 Another one.7 And another one in a note.8 Citation with a suffix and locator.9 Citation with suffix only.10

Now some modifiers.11

References

Doe, John, ‘Article’, Journal of Generic Studies, 6 (2006), 33–34.

---, First Book (Cambridge: Cambridge University Press, 2005).

Doe, John, and Jenny Roe, ‘Why Water Is Wet’, in Third Book, ed by Sam Smith (Oxford: Oxford University Press, 2007).


  1. First Book (Cambridge: Cambridge University Press, 2005).

  2. First Book, p. 30.

  3. First Book, p. 30, with suffix.

  4. 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).

  5. A citation without locators Doe and Roe.

  6. See Doe, First Book, pp. 34–35; also Doe and Roe, chap. 3.

  7. See Doe, First Book, pp. 34–35.

  8. Some citations see Doe, Article, 33–34 (chap. 3); Doe and Roe; Doe, First Book.

  9. Doe, First Book, pp. 33, 35–37, and nowhere else.

  10. Doe, First Book, and nowhere else.

  11. Like a citation without author: First Book, and now Doe with a locator Article, 33–34 (p. 44).

diff --git a/tests/markdown-citations.mhra.txt b/tests/markdown-citations.mhra.txt new file mode 100644 index 000000000..acd700f0d --- /dev/null +++ b/tests/markdown-citations.mhra.txt @@ -0,0 +1,56 @@ +# Pandoc with citeproc-hs + +- [@nonexistent] +- @nonexistent +- John Doe[^1] says blah. +- Doe[^2] says blah. +- Doe[^3] says blah. +- Doe[^4] says blah. +- In a note.[^5] +- A citation group.[^6] +- Another one.[^7] +- And another one in a note.[^8] +- Citation with a suffix and locator.[^9] +- Citation with suffix only.[^10] +- Now some modifiers.[^11] + +# References + +Doe, John, ‘Article’, *Journal of Generic Studies*, 6 (2006), 33-34. + +---, *First Book* (Cambridge: Cambridge University Press, 2005). + +Doe, John, and Jenny Roe, ‘Why Water Is Wet’, in *Third Book*, ed by Sam Smith (Oxford: Oxford University Press, 2007). + +[^1]: + *First Book* (Cambridge: Cambridge University Press, 2005). + +[^2]: + First Book, p. 30. + +[^3]: + First Book, p. 30, with suffix. + +[^4]: + 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). + +[^5]: + A citation without locators Doe and Roe. + +[^6]: + See Doe, First Book, pp. 34-35; also Doe and Roe, chap. 3. + +[^7]: + See Doe, First Book, pp. 34-35. + +[^8]: + Some citations see Doe, Article, 33-34 (chap. 3); Doe and Roe; Doe, First Book. + +[^9]: + Doe, First Book, pp. 33, 35-37, and nowhere else. + +[^10]: + Doe, First Book, and nowhere else. + +[^11]: + Like a citation without author: First Book, and now Doe with a locator Article, 33-34 (p. 44). diff --git a/tests/markdown-citations.txt b/tests/markdown-citations.txt index c54a41304..9b6992f90 100644 --- a/tests/markdown-citations.txt +++ b/tests/markdown-citations.txt @@ -1,22 +1,19 @@ # Pandoc with citeproc-hs -[@nonexistent] - -@nonexistent - -@item1 says blah. -@item1 [p. 30] says blah. -@item1 [p. 30, with suffix] says blah. -@item1 [-@item2 p. 30; see also @item3] says blah. - -In a note.[^1] A citation group [see -@item1 p. 34-35; also @item3 chap. 3]. Another one [see -@item1 p. 34-35]. And another one in a note.[^2] -Citation with a suffix and locator [@item1 pp. 33, 35-37, -and nowhere else]. Citation with suffix only -[@item1, and nowhere else]. - -Now some modifiers.[^3] +- [@nonexistent] +- @nonexistent +- @item1 says blah. +- @item1 [p. 30] says blah. +- @item1 [p. 30, with suffix] says blah. +- @item1 [-@item2 p. 30; see also @item3] says blah. +- In a note.[^1] +- A citation group [see @item1, p. 34-35; also @item3 chap. 3]. +- Another one [see + @item1 p. 34-35]. +- And another one in a note.[^2] +- Citation with a suffix and locator [@item1, pp. 33, 35-37, and nowhere else]. +- Citation with suffix only [@item1, and nowhere else]. +- Now some modifiers.[^3] [^1]: A citation without locators [@item3]. @@ -26,7 +23,7 @@ Now some modifiers.[^3] [^3]: Like a citation without author: [-@item1], and now Doe with a - locator [-@item2 p. 44]. + locator [-@item2, p. 44]. # References -- cgit v1.2.3