File: test-check-doc.R

package info (click to toggle)
r-cran-devtools 2.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,340 kB
  • sloc: sh: 15; makefile: 5
file content (23 lines) | stat: -rw-r--r-- 574 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
test_that("check_man works", {
  # tools:::.check_Rd_xrefs which is called by `check_man()` assumes the base
  # and recommended packages will all be in the library path, which is not the
  # case during R CMD check, so we only run these tests interactively

  skip_if_not(interactive())

  pkg <- local_package_create()
  dir.create(file.path(pkg, "man"))
  writeLines(c("
\\name{foo}
\\title{Foo bar}
\\usage{
foo(x)
}
\\arguments{\\item{foo}{}}
"), file.path(pkg, "man", "foo.Rd"))

expect_output(
  check_man(pkg),
  "Undocumented arguments"
)
})