Running ‘testthat.R’ [6s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(epubr)
  > 
  > test_check("epubr")
  
   *** caught segfault ***
  address 0x1, cause 'memory not mapped'
  
  Traceback:
   1: vroom_(file, delim = "\001", col_names = "V1", col_types = cols(col_character()),     id = NULL, skip = skip, col_select = col_select, name_repair = "minimal",     na = na, quote = "", trim_ws = FALSE, escape_double = FALSE,     escape_backslash = FALSE, comment = "", skip_empty_rows = skip_empty_rows,     locale = locale, guess_max = 0, n_max = n_max, altrep = vroom_altrep(altrep),     num_threads = num_threads, progress = progress)
   2: vroom::vroom_lines(file, skip = skip, locale = locale, n_max = n_max,     progress = progress, altrep = lazy, skip_empty_rows = skip_empty_rows,     na = na, num_threads = num_threads)
   3: readr::read_lines(con)
   4: FUN(X[[i]], ...)
   5: lapply(X = X, FUN = FUN, ...)
   6: sapply(files, function(i) {    if (use_readr) {        con <- file(i, "rb", encoding = encoding)        x <- readr::read_lines(con)    }    else {        con <- file(i, "r", encoding = encoding)        x <- readLines(con, warn = FALSE)    }    x <- paste0(x, collapse = "\n") %>% .clean(clean)    close(con)    x})
   7: eval_tidy(xs[[j]], mask)
   8: tibble_quos(xs, .rows, .name_repair)
   9: tibble::tibble(title = d$title, section = attr(d, "section order"),     text = sapply(files, function(i) {        if (use_readr) {            con <- file(i, "rb", encoding = encoding)            x <- readr::read_lines(con)        }        else {            con <- file(i, "r", encoding = encoding)            x <- readLines(con, warn = FALSE)        }        x <- paste0(x, collapse = "\n") %>% .clean(clean)        close(con)        x    }))
  10: FUN(X[[i]], ...)
  11: lapply(file, .epub_read, fields = fields, drop_sections = drop_sections,     chapter_pattern = chapter_pattern, add_pattern = add_pattern,     clean = dots$clean, title = title, encoding = encoding)
  12: list2(...)
  13: dplyr::bind_rows(lapply(file, .epub_read, fields = fields, drop_sections = drop_sections,     chapter_pattern = chapter_pattern, add_pattern = add_pattern,     clean = dots$clean, title = title, encoding = encoding))
  14: epub(x)
  15: epub_head(file)
  16: eval(code, test_env)
  17: eval(code, test_env)
  18: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  19: doTryCatch(return(expr), name, parentenv, handler)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: tryCatchList(expr, classes, parentenv, handlers)
  22: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  23: doWithOneRestart(return(expr), restart)
  24: withOneRestart(expr, restarts[[1L]])
  25: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  26: test_code(code, parent.frame())
  27: test_that("epub_head returns as expected", {    x <- epub_head(file)    y <- epub_head(epub(file))    expect_identical(x, y)    expect_equal(names(x), c("section", "text"))    expect_equal(dim(x), c(15, 2))})
  28: eval(code, test_env)
  29: eval(code, test_env)
  30: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  31: doTryCatch(return(expr), name, parentenv, handler)
  32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  33: tryCatchList(expr, classes, parentenv, handlers)
  34: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  35: doWithOneRestart(return(expr), restart)
  36: withOneRestart(expr, restarts[[1L]])
  37: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  38: test_code(code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  39: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  40: FUN(X[[i]], ...)
  41: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  42: doTryCatch(return(expr), name, parentenv, handler)
  43: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  44: tryCatchList(expr, classes, parentenv, handlers)
  45: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  46: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  47: test_files_serial(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     desc = desc, load_package = load_package, shuffle = shuffle,     error_call = error_call)
  48: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     load_package = load_package, parallel = parallel, shuffle = shuffle)
  49: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  50: test_check("epubr")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault