Running ‘testthat.R’ [8s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(exampletestr)
  > 
  > test_check("exampletestr")
  
   *** caught segfault ***
  address 0x4b0, cause 'memory not mapped'
  
  Traceback:
   1: eval_tidy(xs[[i]], unique_output)
   2: lst_quos(xs)
   3: lst(update_indention_ref_fun_dec = if (scope >= "indention") update_indention_ref_fun_dec)
   4: style(...)
   5: force(transformers)
   6: make_transformer(transformers)
   7: .f(.x[[i]], ...)
   8: purrr::map(., styler::style_text)
   9: function_list[[k]](value)
  10: withVisible(function_list[[k]](value))
  11: freduce(value, `_function_list`)
  12: `_fseq`(`_lhs`)
  13: eval(quote(`_fseq`(`_lhs`)), env, env)
  14: eval(quote(`_fseq`(`_lhs`)), env, env)
  15: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  16: text_expr %>% parse(text = .) %>% purrr::map(deparse) %>% purrr::map(styler::style_text)
  17: extract_expressions(example_block)
  18: (function (example_block, desc = "", e_e = TRUE) {    checkmate::assert_character(example_block)    if (!length(example_block))         return(character(0))    expressions <- extract_expressions(example_block)    if (e_e) {        for_checking <- expressions %>% purrr::map(filesstrings::remove_quoted) %>%             purrr::map(stringr::str_replace_all, " ", "")        leave_alone <- purrr::map_lgl(for_checking, ~any(stringr::str_detect(.,             paste0("(?:<-|^stop\\(|^warning", "\\(|^#|^setwd\\(|^library\\(|",                 "^plot\\(|^ggplot\\(|^print", "\\(|^set\\.seed\\()"))))        inside_test_that <- purrr::map2(leave_alone, expressions,             ~if (.x) {                .y            }            else {                construct_expect_equal(.y)            }) %>% unlist()    }    else {        inside_test_that <- unlist(expressions)    }    c(paste0("test_that(\"", desc, "\", {"), paste(" ", inside_test_that),         "})")})(dots[[1L]][[1L]], dots[[2L]][[1L]], e_e = dots[[3L]][[1L]])
  19: mapply(make_test_shell, SIMPLIFY = FALSE, exampless, paste0("`",     names(exampless), "()` works"), e_e = e_e)
  20: .f(.x[[i]], ...)
  21: purrr::map(., make_tests_shells_file, overwrite = overwrite,     e_e = e_e, open = open, document = FALSE)
  22: function_list[[i]](value)
  23: freduce(value, `_function_list`)
  24: `_fseq`(`_lhs`)
  25: eval(quote(`_fseq`(`_lhs`)), env, env)
  26: eval(quote(`_fseq`(`_lhs`)), env, env)
  27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  28: list.files(path = rprojroot::find_package_root_file("R")) %>%     purrr::map(make_tests_shells_file, overwrite = overwrite,         e_e = e_e, open = open, document = FALSE) %>% invisible()
  29: make_tests_shells_pkg(overwrite = TRUE)
  30: eval(code, test_env)
  31: eval(code, test_env)
  32: 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)
  33: doTryCatch(return(expr), name, parentenv, handler)
  34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  35: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  36: doTryCatch(return(expr), name, parentenv, handler)
  37: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  38: tryCatchList(expr, classes, parentenv, handlers)
  39: 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) {    })
  40: test_code(desc, code, env = parent.frame())
  41: test_that("`make_tests_shells_file()` works", {    cwd <- getwd()    on.exit(setwd(cwd))    setwd(tempdir())    expect_true(devtools::create("tempkg", quiet = TRUE))    setwd("tempkg")    expect_true(all(file.copy(system.file("extdata", c("detect.R",         "match.R"), package = "exampletestr"), "R")))    make_tests_shells_file("R/detect.R", open = FALSE)    expect_equal(readr::read_lines("tests/testthat/test-detect-examples.R"),         c("context(\"Detect\")", "", "test_that(\"`str_detect()` works\", {",             "  fruit <- c(\"apple\", \"banana\", \"pear\", \"pinapple\")",             "  expect_equal(str_detect(fruit, \"a\"), )", "  expect_equal(str_detect(fruit, \"^a\"), )",             "  expect_equal(str_detect(fruit, \"a$\"), )", "  expect_equal(str_detect(fruit, \"b\"), )",             "  expect_equal(str_detect(fruit, \"[aeiou]\"), )",             "  expect_equal(str_detect(\"aecfg\", letters), )",             "})"))    empty_lines <- character(2)    readr::write_lines(empty_lines, "R/empty.R")    make_tests_shells_pkg(overwrite = TRUE)    context("Packages")    expect_error(make_tests_shells_pkg(overwrite = FALSE), "Stopping as to proceed would be to overwrite")    expect_equal(readr::read_lines("tests/testthat/test-detect-examples.R"),         c("context(\"Detect\")", "", "test_that(\"`str_detect()` works\", {",             "  fruit <- c(\"apple\", \"banana\", \"pear\", \"pinapple\")",             "  expect_equal(str_detect(fruit, \"a\"), )", "  expect_equal(str_detect(fruit, \"^a\"), )",             "  expect_equal(str_detect(fruit, \"a$\"), )", "  expect_equal(str_detect(fruit, \"b\"), )",             "  expect_equal(str_detect(fruit, \"[aeiou]\"), )",             "  expect_equal(str_detect(\"aecfg\", letters), )",             "})"))    setwd("..")    expect_true(filesstrings::dir.remove("tempkg"))    expect_error(make_tests_shells_file("detect", open = FALSE),         "no DESCRIPTION file")    expect_error(make_tests_shells_pkg(), "no DESCRIPTION file")    setwd(cwd)})
  42: eval(code, test_env)
  43: eval(code, test_env)
  44: 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)
  45: doTryCatch(return(expr), name, parentenv, handler)
  46: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  47: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  48: doTryCatch(return(expr), name, parentenv, handler)
  49: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  50: tryCatchList(expr, classes, parentenv, handlers)
  51: 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) {    })
  52: test_code(NULL, exprs, env)
  53: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  54: force(code)
  55: 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()    })
  56: FUN(X[[i]], ...)
  57: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  58: force(code)
  59: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  60: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  61: 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)
  62: 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)
  63: test_check("exampletestr")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault