File: test-word.R

package info (click to toggle)
r-cran-bookdown 0.42%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,752 kB
  • sloc: javascript: 11,343; makefile: 21; sh: 20
file content (10 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
test_that("process_markdown() correctly resolves reference", {
  skip_if_not_pandoc()
  # testing using markdown_document2() for snapshotting easier
  rmd <- local_rmd_file(
    "# Theory {#theory}", "", "see \\@ref(label1)", "",
    "## Some other header {#label1}", "", "Content"
  )
  content <- .render_and_read(rmd, output_format = markdown_document2())
  expect_match(content, 'see <a href="#label1">1.1</a>', fixed = TRUE, all = FALSE)
})