Running 'testthat.R' [5s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(unheadr)
  > 
  > test_check("unheadr")
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 30 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-annotate_mf.R:12:3): error when spreadsheet has empty or NA values in the header row ──
  `annotate_mf("./dog_testNAvar.xlsx", orig = emptyvar, new = Task_annotated)` threw an error with unexpected message.
  Expected match: "Check the spreadsheet for empty values in the header row"
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-annotate_mf.R:12:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─unheadr::annotate_mf(...)
    7. │ └─readxl::read_excel(xlfilepath)
    8. │   └─readxl:::read_excel_(...)
    9. │     └─readxl:::set_readxl_names(...)
   10. │       ├─tibble::as_tibble(l, .name_repair = .name_repair)
   11. │       └─tibble:::as_tibble.list(l, .name_repair = .name_repair)
   12. │         └─tibble:::lst_to_tibble(x, .rows, .name_repair, col_lengths(x))
   13. │           └─tibble:::set_repaired_names(x, repair_hint = TRUE, .name_repair)
   14. │             ├─rlang::set_names(...)
   15. │             └─tibble:::repaired_names(...)
   16. │               ├─tibble:::subclass_name_repair_errors(...)
   17. │               │ └─base::withCallingHandlers(...)
   18. │               └─vctrs::vec_as_names(...)
   19. └─vctrs:::describe_repair(`<chr>`, `<chr>`)
   20.   └─rlang::names_inform_repair(orig_names, names)
   21.     └─rlang::inform(message = message, class = "rlib_message_name_repair")
   22.       ├─base::withRestarts(...)
   23.       │ └─base (local) withOneRestart(expr, restarts[[1L]])
   24.       │   └─base (local) doWithOneRestart(return(expr), restart)
   25.       └─base::signalCondition(cnd)
   26.         ├─base::conditionMessage(cond)
   27.         └─rlang:::conditionMessage.rlang_message(cond)
   28.           └─rlang::cnd_message(c)
   29.             └─rlang:::cnd_message_format(cnd, ...)
   30.               └─rlang (local) cli_format(glue_escape(lines))
   31.                 └─rlang:::.rlang_cli_format(x, cli::format_message)
   32.                   └─cli::cli_format(x, .envir = emptyenv())
   33.                     └─cli:::fmt(...)
   34.                       └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   35.                         ├─base::do.call(app[[msg$type]], msg$args)
   36.                         └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-18", class = NULL)
   37.                           └─cli:::clii_bullets(app, text, id, class)
   38.                             └─base::lapply(...)
   39.                               └─cli (local) FUN(X[[i]], ...)
   40.                                 └─app$text(text[[i]])
   41.                                   └─cli:::clii_text(app, text)
   42.                                     └─app$xtext(text)
   43.                                       └─cli:::clii__xtext(...)
   44.                                         └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   45.                                           └─base::lapply(pars, ansi_trimws)
   46.                                             └─cli (local) FUN(X[[i]], ...)
  ── Failure (test-annotate_mf_all.R:10:3): error when spreadsheet has empty or NA values in the header row ──
  `annotate_mf_all("./dog_testNAvar.xlsx")` threw an error with unexpected message.
  Expected match: "Check the spreadsheet for empty values in the header row"
  Actual message: "number of characters is not computable in \"bytes\" encoding, element 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-annotate_mf_all.R:10:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─unheadr::annotate_mf_all("./dog_testNAvar.xlsx")
    7. │ └─readxl::read_excel(xlfilepath)
    8. │   └─readxl:::read_excel_(...)
    9. │     └─readxl:::set_readxl_names(...)
   10. │       ├─tibble::as_tibble(l, .name_repair = .name_repair)
   11. │       └─tibble:::as_tibble.list(l, .name_repair = .name_repair)
   12. │         └─tibble:::lst_to_tibble(x, .rows, .name_repair, col_lengths(x))
   13. │           └─tibble:::set_repaired_names(x, repair_hint = TRUE, .name_repair)
   14. │             ├─rlang::set_names(...)
   15. │             └─tibble:::repaired_names(...)
   16. │               ├─tibble:::subclass_name_repair_errors(...)
   17. │               │ └─base::withCallingHandlers(...)
   18. │               └─vctrs::vec_as_names(...)
   19. └─vctrs:::describe_repair(`<chr>`, `<chr>`)
   20.   └─rlang::names_inform_repair(orig_names, names)
   21.     └─rlang::inform(message = message, class = "rlib_message_name_repair")
   22.       ├─base::withRestarts(...)
   23.       │ └─base (local) withOneRestart(expr, restarts[[1L]])
   24.       │   └─base (local) doWithOneRestart(return(expr), restart)
   25.       └─base::signalCondition(cnd)
   26.         ├─base::conditionMessage(cond)
   27.         └─rlang:::conditionMessage.rlang_message(cond)
   28.           └─rlang::cnd_message(c)
   29.             └─rlang:::cnd_message_format(cnd, ...)
   30.               └─rlang (local) cli_format(glue_escape(lines))
   31.                 └─rlang:::.rlang_cli_format(x, cli::format_message)
   32.                   └─cli::cli_format(x, .envir = emptyenv())
   33.                     └─cli:::fmt(...)
   34.                       └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   35.                         ├─base::do.call(app[[msg$type]], msg$args)
   36.                         └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-36", class = NULL)
   37.                           └─cli:::clii_bullets(app, text, id, class)
   38.                             └─base::lapply(...)
   39.                               └─cli (local) FUN(X[[i]], ...)
   40.                                 └─app$text(text[[i]])
   41.                                   └─cli:::clii_text(app, text)
   42.                                     └─app$xtext(text)
   43.                                       └─cli:::clii__xtext(...)
   44.                                         └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   45.                                           └─base::lapply(pars, ansi_trimws)
   46.                                             └─cli (local) FUN(X[[i]], ...)
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 30 ]
  Error: Test failures
  Execution halted