context("Get authors")
test_that("Authors (any order) found in SchoolFunding.tex", {
expect_equal(sort(get_authors("./SchoolFunding/SchoolFunding.tex")),
c("Carmela Chivers", "Julie Sonnemann", "Kate Griffiths", "Peter Goss"))
})
test_that("Authors (any order) found in input: tex/acknowledgements", {
expect_equal(sort(get_authors("./get-authors/input.tex")),
c("Hal Swerissen", "Stephen Duckett", "Trent Wiltshire"))
})
test_that("Editorial authors not returned", {
expect_equal(get_authors("./get-authors/editorial-authors.tex", include_editors = FALSE),
c("Stephen Duckett", "Hal Swerissen"))
})
test_that("Additional authors are returned", {
expect_equal(get_authors("./get-authors/add-authors-to-citation.tex", include_editors = FALSE),
c("Stephen Duckett", "Hal Swerissen", "Lemony Snicket"))
})
test_that("Additional authors are returned in specified order", {
expect_equal(get_authors("./get-authors/add-ordered-authors-to-citation.tex", include_editors = FALSE),
c("Stephen Duckett", "Lemony Snicket", "Hal Swerissen"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.