Running ‘runit.R’
  Running ‘testthat.R’
Running the tests in ‘tests/runit.R’ failed.
Complete output:
  > #!/usr/bin/Rscript --vanilla
  > is_failure <- function(result) {
  +     res <- result[[1]]
  +     names(res) <- tolower(names(res)) # soothe lintr
  +     sum_of_exceptions <- res[["nerr"]] + res[["nfail"]]
  +     fail <- as.logical(sum_of_exceptions)
  +     return(fail)
  + }
  > unit_dir <- system.file("runit", package = "document")
  > package_suite <- RUnit::defineTestSuite("document_unit_test",
  +                                         dirs = unit_dir,
  +                                         testFileRegexp = "^.*\\.r",
  +                                         testFuncRegexp = "^test_+")
  > 
  > test_result <- RUnit::runTestSuite(package_suite)
  Loading required package: document
  
  
  Executing test function test_txt  ... 
   *** caught segfault ***
  address 530fdc10, cause 'memory not mapped'
  
  Traceback:
   1: qtest(x, "S+")
   2: checkFileExists(x, access, extension)
   3: checkmate::assertFile(file_name, access = "r")
   4: document(input, output_directory = output_directory, check_package = FALSE,     runit = TRUE)
   5: func()
   6: system.time(func(), gcFirst = RUnitEnv$.gcBeforeTest)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
  11: try(system.time(func(), gcFirst = RUnitEnv$.gcBeforeTest))
  12: .executeTestCase(funcName, envir = sandbox, setUpFunc = .setUp,     tearDownFunc = .tearDown)
  13: .sourceTestFile(testFile, testSuite$testFuncRegexp)
  14: RUnit::runTestSuite(package_suite)
  An irrecoverable exception occurred. R is aborting now ...
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > running_on_my_machines <- function() {
  +     sys_info <- Sys.info()
  +     r <- sys_info[["nodename"]] %in% c("h7") &&
  +         sys_info[["effective_user"]] == "qwer" &&
  +         .Platform[["OS.type"]] == "unix"
  +     return(r)
  + }
  > 
  > set_NOT_CRAN  <- function() {
  +     is_unset <- is.na(Sys.getenv("NOT_CRAN", unset = NA))
  +     if (running_on_my_machines() && is_unset)
  +         Sys.setenv("NOT_CRAN" = TRUE)
  + }
  > 
  > set_NOT_CRAN()
  > library("testthat")
  > library("document")
  > test_check("document")
  
   *** caught segfault ***
  address 530fdc10, cause 'memory not mapped'
  
  Traceback:
   1: qtest(x, "S+")
   2: checkFileExists(x, access, extension)
   3: checkmate::assertFile(file_name, access = "r")
   4: document(file_name, check_package = TRUE, runit = TRUE)
   5: eval(code, test_env)
   6: eval(code, test_env)
   7: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  11: doTryCatch(return(expr), name, parentenv, handler)
  12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  15: test_code(NULL, exprs, env)
  16: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  17: force(code)
  18: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  19: FUN(X[[i]], ...)
  20: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  21: force(code)
  22: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  23: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  24: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  25: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  26: test_check("document")
  An irrecoverable exception occurred. R is aborting now ...