Running ‘spelling.R’
  Running ‘testthat.R’ [3s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(exampletestr)
  > 
  > test_check("exampletestr")
  ── 1. Failure: `extract_examples()` works (@test-exemplar.R#3)  ────────────────
  `extract_examples("detect", tempdir(check = TRUE))` threw an error with unexpected message.
  Expected match: "no DESCRIPTION file"
  Actual message: "STRING_ELT() can only be applied to a 'character vector', not a 'raw'"
  
  
   *** caught segfault ***
  address 54, cause 'memory not mapped'
  
  Traceback:
   1: qtest(x, "S+")
   2: checkDirectoryExists(x, access)
   3: checkmate::assert_directory_exists(pkg_dir)
   4: extract_examples("detect", pkg_dir = tempdir())
   5: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
   6: suppressMessages(extract_examples("detect", pkg_dir = tempdir()))
   7: eval(code, test_env)
   8: eval(code, test_env)
   9: 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)
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  13: doTryCatch(return(expr), name, parentenv, handler)
  14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  15: tryCatchList(expr, classes, parentenv, handlers)
  16: 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) {    })
  17: test_code(desc, code, env = parent.frame())
  18: test_that("`extract_examples()` works", {    expect_error(extract_examples("detect", tempdir(check = TRUE)),         "no DESCRIPTION file")    utils::capture.output(usethis::create_package(tempdir(),         open = FALSE)) %>% invisible()    expect_true(file.copy(system.file("extdata", "detect.R",         package = "exampletestr"), paste0(tempdir(), "/R")))    extracted_examples <- suppressMessages(extract_examples("detect",         pkg_dir = tempdir()))    expect_equal(extracted_examples, list(str_detect = c("### Name: str_detect",         paste("### Title:", "Detect the presence or absence of a pattern",             "in a string."), "### Aliases: str_detect", "", "### ** Examples",         "", "fruit <- c(\"apple\", \"banana\", \"pear\", \"pinapple\")",         "str_detect(fruit, \"a\")", "str_detect(fruit, \"^a\")",         "str_detect(fruit, \"a$\")", "str_detect(fruit, \"b\")",         "str_detect(fruit, \"[aeiou]\")", "", "# Also vectorised over pattern",         "str_detect(\"aecfg\", letters)", "", "", "")))    suppressMessages(empty_dir(tempdir()))})
  19: eval(code, test_env)
  20: eval(code, test_env)
  21: 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)
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  25: doTryCatch(return(expr), name, parentenv, handler)
  26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  27: tryCatchList(expr, classes, parentenv, handlers)
  28: 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) {    })
  29: test_code(NULL, exprs, env)
  30: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  31: force(code)
  32: 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()    })
  33: FUN(X[[i]], ...)
  34: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  35: force(code)
  36: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  37: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  38: 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)
  39: 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)
  40: test_check("exampletestr")
  An irrecoverable exception occurred. R is aborting now ...