Skip to content

Commit

Permalink
the filenames use the separator - instead of _
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Sep 13, 2020
1 parent de7c238 commit 8e4551c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test-rmd.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@ if (Sys.getenv('NOT_CRAN') == 'true') local({
# footnotes are parsed and moved correctly
## deleted from last section
if (any(readLines("rmd/subsection-footnotes-2.html") == '<div class="footnotes">')) {
stop('Failed to parse and delete the footnotes in parse_footnotes.Rmd')
stop('Failed to parse and delete the footnotes in parse-footnotes.Rmd')
}
## footnote one is moved to first section
if (!any(readLines('rmd/test-footnote.html') == '<div class="footnotes">') ||
!any(grepl('id="fn1"', readLines('rmd/test-footnote.html')))) {
stop('Failed to move the footnotes back to subsection 1 in parse_footnotes.Rmd')
stop('Failed to move the footnotes back to subsection 1 in parse-footnotes.Rmd')
}
## footnote two is moved to second section
if (!any(readLines('rmd/subsection-footnotes-1.html') == '<div class="footnotes">') ||
!any(grepl('id="fn2"', readLines('rmd/subsection-footnotes-1.html')))) {
stop('Failed to move the footnotes back to subsection 1 in parse_footnotes.Rmd')
stop('Failed to move the footnotes back to subsection 1 in parse-footnotes.Rmd')
}
# multiline footnote is also moved
if (!any(readLines('rmd/subsection-footnotes-1.html') == '<div class="footnotes">') ||
!any(grepl('id="fn3"', readLines('rmd/subsection-footnotes-1.html')))) {
stop('Failed to move the footnotes back to subsection 1 in parse_footnotes.Rmd')
stop('Failed to move the footnotes back to subsection 1 in parse-footnotes.Rmd')
}

# number sections now works in markdown_document2
if (!any(readLines("rmd/number-sections.md") == "1.1 subsection 1") ||
!any(grepl("<a href=.*>2</a>", readLines("rmd/number-sections.md")))) {
stop("Something wrong in number_sections.Rmd")
stop("Something wrong in number-sections.Rmd")
}
})

0 comments on commit 8e4551c

Please sign in to comment.