library(checkmate) library(R6) expect_man_exists = function(man) { checkmate::expect_string(man, na.ok = TRUE, fixed = "::") if (!is.na(man)) { parts = strsplit(man, "::", fixed = TRUE)[[1L]] matches = help.search(parts[2L], package = parts[1L], ignore.case = FALSE) checkmate::expect_data_frame(matches$matches, min.rows = 1L, info = "man page lookup") } }