Running ‘testthat.R’ [11s/18s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(haven)
  > 
  > test_check("haven")
  [ FAIL 8 | WARN 0 | SKIP 9 | PASS 425 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (9)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-haven-sas.R:48:3): default name repair can be overridden ────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─testthat::expect_message(read_sas(path), "id...1") at test-haven-sas.R:48:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─haven::read_sas(path)
    8. │ └─haven:::df_parse_sas_file(...)
    9. ├─tibble (local) `<fn>`(`<named list>`, .rows = 3L, .name_repair = "unique")
   10. ├─tibble:::as_tibble.list(`<named list>`, .rows = 3L, .name_repair = "unique")
   11. │ └─tibble:::lst_to_tibble(x, .rows, .name_repair, col_lengths(x))
   12. │   └─tibble:::set_repaired_names(x, repair_hint = TRUE, .name_repair)
   13. │     ├─rlang::set_names(...)
   14. │     └─tibble:::repaired_names(...)
   15. │       ├─tibble:::subclass_name_repair_errors(...)
   16. │       │ └─base::withCallingHandlers(...)
   17. │       └─vctrs::vec_as_names(...)
   18. └─vctrs:::describe_repair(`<chr>`, `<chr>`)
   19.   └─rlang::names_inform_repair(orig_names, names)
   20.     └─rlang::inform(message = message, class = "rlib_message_name_repair")
   21.       ├─base::withRestarts(...)
   22.       │ └─base (local) withOneRestart(expr, restarts[[1L]])
   23.       │   └─base (local) doWithOneRestart(return(expr), restart)
   24.       └─base::signalCondition(cnd)
   25.         ├─base::conditionMessage(cond)
   26.         └─rlang:::conditionMessage.rlang_message(cond)
   27.           └─rlang::cnd_message(c)
   28.             └─rlang:::cnd_message_format(cnd, ...)
   29.               └─rlang (local) cli_format(glue_escape(lines))
   30.                 └─rlang:::.rlang_cli_format(x, cli::format_message)
   31.                   └─cli::cli_format(x, .envir = emptyenv())
   32.                     └─cli:::fmt(...)
   33.                       └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   34.                         ├─base::do.call(app[[msg$type]], msg$args)
   35.                         └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-30", class = NULL)
   36.                           └─cli:::clii_bullets(app, text, id, class)
   37.                             └─base::lapply(...)
   38.                               └─cli (local) FUN(X[[i]], ...)
   39.                                 └─app$text(text[[i]])
   40.                                   └─cli:::clii_text(app, text)
   41.                                     └─app$xtext(text)
   42.                                       └─cli:::clii__xtext(...)
   43.                                         └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   44.                                           └─base::lapply(pars, ansi_trimws)
   45.                                             └─cli (local) FUN(X[[i]], ...)
  ── Error (test-haven-stata.R:218:3): invalid files generate informative errors ──
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. └─testthat::expect_snapshot(...) at test-haven-stata.R:218:2
    2.   └─testthat:::verify_exec(quo_get_expr(x), quo_get_env(x), replay)
    3.     ├─base::unlist(lapply(results, replay))
    4.     └─base::lapply(results, replay)
    5.       └─testthat (local) FUN(X[[i]], ...)
    6.         ├─testthat:::snapshot_replay(x, state, transform = transform, cnd_class = cnd_class)
    7.         └─testthat:::snapshot_replay.condition(...)
    8.           └─rlang::cnd_message(x, prefix = TRUE)
    9.             └─rlang:::cnd_message_format_prefixed(cnd, ..., parent = FALSE)
   10.               └─rlang:::cnd_message_format(cnd, ..., alert = alert)
   11.                 └─rlang (local) cli_format(glue_escape(lines))
   12.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   13.                     └─cli::cli_format(x, .envir = emptyenv())
   14.                       └─cli:::fmt(...)
   15.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   16.                           ├─base::do.call(app[[msg$type]], msg$args)
   17.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-231", class = NULL)
   18.                             └─cli:::clii_bullets(app, text, id, class)
   19.                               └─base::lapply(...)
   20.                                 └─cli (local) FUN(X[[i]], ...)
   21.                                   └─app$text(text[[i]])
   22.                                     └─cli:::clii_text(app, text)
   23.                                       └─app$xtext(text)
   24.                                         └─cli:::clii__xtext(...)
   25.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   26.                                             └─base::lapply(pars, ansi_trimws)
   27.                                               └─cli (local) FUN(X[[i]], ...)
  ── Error (test-labelled.R:152:3): take labels from LHS ─────────────────────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot_warning(...) at test-labelled.R:152:2
    2. │ └─testthat:::expect_snapshot_condition(...)
    3. │   └─testthat:::capture_matching_condition(x, cnd_matcher(class))
    4. │     └─base::withCallingHandlers(...)
    5. ├─testthat::expect_equal(...) at test-labelled.R:153:4
    6. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    7. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    8. └─vctrs::vec_c(...)
    9.   └─vctrs (local) `<fn>`()
   10.     └─haven:::vec_ptype2.haven_labelled.haven_labelled(...)
   11.       └─haven:::combine_labels(x_labels, y_labels, x_arg, y_arg)
   12.         └─cli::cli_warn(...)
   13.           ├─rlang::warn(...)
   14.           │ └─rlang:::validate_signal_args(...)
   15.           └─cli::format_warning(escaped_message, .envir = .envir)
   16.             └─cli:::fmt(...)
   17.               └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   18.                 ├─base::do.call(app[[msg$type]], msg$args)
   19.                 └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-350", class = NULL)
   20.                   └─cli:::clii_bullets(app, text, id, class)
   21.                     └─base::lapply(...)
   22.                       └─cli (local) FUN(X[[i]], ...)
   23.                         └─app$text(text[[i]])
   24.                           └─cli:::clii_text(app, text)
   25.                             └─app$xtext(text)
   26.                               └─cli:::clii__xtext(...)
   27.                                 └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   28.                                   └─base::lapply(pars, ansi_trimws)
   29.                                     └─cli (local) FUN(X[[i]], ...)
  ── Error (test-labelled.R:174:3): warn only for conflicting labels ─────────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot_warning(...) at test-labelled.R:174:2
    2. │ └─testthat:::expect_snapshot_condition(...)
    3. │   └─testthat:::capture_matching_condition(x, cnd_matcher(class))
    4. │     └─base::withCallingHandlers(...)
    5. ├─base::c(x, y) at test-labelled.R:177:4
    6. └─vctrs:::c.vctrs_vctr(x, y) at test-labelled.R:177:4
    7.   └─vctrs::vec_c(...)
    8.     └─vctrs (local) `<fn>`()
    9.       └─haven:::vec_ptype2.haven_labelled.haven_labelled(...)
   10.         └─haven:::combine_labels(x_labels, y_labels, x_arg, y_arg)
   11.           └─cli::cli_warn(...)
   12.             ├─rlang::warn(...)
   13.             │ └─rlang:::validate_signal_args(...)
   14.             └─cli::format_warning(escaped_message, .envir = .envir)
   15.               └─cli:::fmt(...)
   16.                 └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   17.                   ├─base::do.call(app[[msg$type]], msg$args)
   18.                   └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-364", class = NULL)
   19.                     └─cli:::clii_bullets(app, text, id, class)
   20.                       └─base::lapply(...)
   21.                         └─cli (local) FUN(X[[i]], ...)
   22.                           └─app$text(text[[i]])
   23.                             └─cli:::clii_text(app, text)
   24.                               └─app$xtext(text)
   25.                                 └─cli:::clii__xtext(...)
   26.                                   └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   27.                                     └─base::lapply(pars, ansi_trimws)
   28.                                       └─cli (local) FUN(X[[i]], ...)
  ── Error (test-labelled_spss.R:4:3): constructor checks na_value ───────────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. └─testthat::expect_snapshot(...) at test-labelled_spss.R:4:2
    2.   └─testthat:::verify_exec(quo_get_expr(x), quo_get_env(x), replay)
    3.     ├─base::unlist(lapply(results, replay))
    4.     └─base::lapply(results, replay)
    5.       └─testthat (local) FUN(X[[i]], ...)
    6.         ├─testthat:::snapshot_replay(x, state, transform = transform, cnd_class = cnd_class)
    7.         └─testthat:::snapshot_replay.condition(...)
    8.           └─rlang::cnd_message(x, prefix = TRUE)
    9.             └─rlang:::cnd_message_format_prefixed(cnd, ..., parent = FALSE)
   10.               └─rlang:::cnd_message_format(cnd, ..., alert = alert)
   11.                 └─rlang (local) cli_format(glue_escape(lines))
   12.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   13.                     └─cli::cli_format(x, .envir = emptyenv())
   14.                       └─cli:::fmt(...)
   15.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   16.                           ├─base::do.call(app[[msg$type]], msg$args)
   17.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-400", class = NULL)
   18.                             └─cli:::clii_bullets(app, text, id, class)
   19.                               └─base::lapply(...)
   20.                                 └─cli (local) FUN(X[[i]], ...)
   21.                                   └─app$text(text[[i]])
   22.                                     └─cli:::clii_text(app, text)
   23.                                       └─app$xtext(text)
   24.                                         └─cli:::clii__xtext(...)
   25.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   26.                                             └─base::lapply(pars, ansi_trimws)
   27.                                               └─cli (local) FUN(X[[i]], ...)
  ── Error (test-labelled_spss.R:11:3): constructor checks na_range ──────────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. └─testthat::expect_snapshot(...) at test-labelled_spss.R:11:2
    2.   └─testthat:::verify_exec(quo_get_expr(x), quo_get_env(x), replay)
    3.     ├─base::unlist(lapply(results, replay))
    4.     └─base::lapply(results, replay)
    5.       └─testthat (local) FUN(X[[i]], ...)
    6.         ├─testthat:::snapshot_replay(x, state, transform = transform, cnd_class = cnd_class)
    7.         └─testthat:::snapshot_replay.condition(...)
    8.           └─rlang::cnd_message(x, prefix = TRUE)
    9.             └─rlang:::cnd_message_format_prefixed(cnd, ..., parent = FALSE)
   10.               └─rlang:::cnd_message_format(cnd, ..., alert = alert)
   11.                 └─rlang (local) cli_format(glue_escape(lines))
   12.                   └─rlang:::.rlang_cli_format(x, cli::format_error)
   13.                     └─cli::cli_format(x, .envir = emptyenv())
   14.                       └─cli:::fmt(...)
   15.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   16.                           ├─base::do.call(app[[msg$type]], msg$args)
   17.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-487", class = NULL)
   18.                             └─cli:::clii_bullets(app, text, id, class)
   19.                               └─base::lapply(...)
   20.                                 └─cli (local) FUN(X[[i]], ...)
   21.                                   └─app$text(text[[i]])
   22.                                     └─cli:::clii_text(app, text)
   23.                                       └─app$xtext(text)
   24.                                         └─cli:::clii__xtext(...)
   25.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   26.                                             └─base::lapply(pars, ansi_trimws)
   27.                                               └─cli (local) FUN(X[[i]], ...)
  ── Error (test-labelled_spss.R:161:3): take labels from LHS ────────────────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot_warning(...) at test-labelled_spss.R:161:2
    2. │ └─testthat:::expect_snapshot_condition(...)
    3. │   └─testthat:::capture_matching_condition(x, cnd_matcher(class))
    4. │     └─base::withCallingHandlers(...)
    5. ├─testthat::expect_equal(...) at test-labelled_spss.R:162:4
    6. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    7. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    8. └─vctrs::vec_c(...)
    9.   └─vctrs (local) `<fn>`()
   10.     └─haven:::vec_ptype2.haven_labelled_spss.haven_labelled_spss(...)
   11.       └─haven:::combine_labels(x_labels, y_labels, x_arg, y_arg)
   12.         └─cli::cli_warn(...)
   13.           ├─rlang::warn(...)
   14.           │ └─rlang:::validate_signal_args(...)
   15.           └─cli::format_warning(escaped_message, .envir = .envir)
   16.             └─cli:::fmt(...)
   17.               └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   18.                 ├─base::do.call(app[[msg$type]], msg$args)
   19.                 └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-513", class = NULL)
   20.                   └─cli:::clii_bullets(app, text, id, class)
   21.                     └─base::lapply(...)
   22.                       └─cli (local) FUN(X[[i]], ...)
   23.                         └─app$text(text[[i]])
   24.                           └─cli:::clii_text(app, text)
   25.                             └─app$xtext(text)
   26.                               └─cli:::clii__xtext(...)
   27.                                 └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   28.                                   └─base::lapply(pars, ansi_trimws)
   29.                                     └─cli (local) FUN(X[[i]], ...)
  ── Error (test-labelled_spss.R:183:3): warn only for conflicting labels ────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─testthat::expect_snapshot_warning(...) at test-labelled_spss.R:183:2
    2. │ └─testthat:::expect_snapshot_condition(...)
    3. │   └─testthat:::capture_matching_condition(x, cnd_matcher(class))
    4. │     └─base::withCallingHandlers(...)
    5. ├─base::c(x, y) at test-labelled_spss.R:186:4
    6. └─vctrs:::c.vctrs_vctr(x, y) at test-labelled_spss.R:186:4
    7.   └─vctrs::vec_c(...)
    8.     └─vctrs (local) `<fn>`()
    9.       └─haven:::vec_ptype2.haven_labelled_spss.haven_labelled_spss(...)
   10.         └─haven:::combine_labels(x_labels, y_labels, x_arg, y_arg)
   11.           └─cli::cli_warn(...)
   12.             ├─rlang::warn(...)
   13.             │ └─rlang:::validate_signal_args(...)
   14.             └─cli::format_warning(escaped_message, .envir = .envir)
   15.               └─cli:::fmt(...)
   16.                 └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   17.                   ├─base::do.call(app[[msg$type]], msg$args)
   18.                   └─cli (local) `<fn>`(text = `<named list>`, id = "cli-2553110-527", class = NULL)
   19.                     └─cli:::clii_bullets(app, text, id, class)
   20.                       └─base::lapply(...)
   21.                         └─cli (local) FUN(X[[i]], ...)
   22.                           └─app$text(text[[i]])
   23.                             └─cli:::clii_text(app, text)
   24.                               └─app$xtext(text)
   25.                                 └─cli:::clii__xtext(...)
   26.                                   └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   27.                                     └─base::lapply(pars, ansi_trimws)
   28.                                       └─cli (local) FUN(X[[i]], ...)
  
  [ FAIL 8 | WARN 0 | SKIP 9 | PASS 425 ]
  Error: Test failures
  Execution halted