Running 'spelling.R' [0s]
  Running 'testthat.R' [14s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(exampletestr)
  > 
  > get_os <- function() {
  +   sysinf <- Sys.info()
  +   if (!is.null(sysinf)) {
  +     os <- sysinf["sysname"]
  +     if (os == "Darwin") {
  +       os <- "osx"
  +     }
  +   } else { ## mystery machine
  +     os <- .Platform$OS.type
  +     if (grepl("^darwin", R.version$os)) {
  +       os <- "osx"
  +     }
  +     if (grepl("linux-gnu", R.version$os)) {
  +       os <- "linux"
  +     }
  +   }
  +   if (os == "osx") os <- "mac"
  +   tolower(os)
  + }
  > 
  > if (get_os() != "mac" || Sys.getenv("NOT_CRAN") == "true") {
  +   test_check("exampletestr")
  + }
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 10 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-example-extraction.R:23:3): `extract_examples()` works ──────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─utils::capture.output(roxygen2::roxygenize(pkg_dir)) at test-example-extraction.R:23:2
    2. │ └─base::withVisible(...elt(i))
    3. └─roxygen2::roxygenize(pkg_dir)
    4.   └─roxygen2 (local) load_code(base_path)
    5.     └─pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
    6.       └─cli::cli_inform(c(i = "Loading {.pkg {package}}"))
    7.         ├─rlang::inform(...)
    8.         │ └─message %||% ""
    9.         └─cli::format_message(message, .envir = .envir)
   10.           └─cli:::fmt(...)
   11.             └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   12.               ├─base::do.call(app[[msg$type]], msg$args)
   13.               └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-8", class = NULL)
   14.                 └─cli:::clii_bullets(app, text, id, class)
   15.                   └─base::lapply(...)
   16.                     └─cli (local) FUN(X[[i]], ...)
   17.                       └─app$text(text[[i]])
   18.                         └─cli:::clii_text(app, text)
   19.                           └─app$xtext(text)
   20.                             └─cli:::clii__xtext(...)
   21.                               └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   22.                                 └─base::lapply(pars, ansi_trimws)
   23.                                   └─cli (local) FUN(X[[i]], ...)
  ── Error (test-files.R:22:3): `make_tests_shells_file()` and `make_tests_shells_pkg()` work ──
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. └─base::replicate(...) at test-files.R:22:2
    2.   └─base::sapply(...)
    3.     └─base::lapply(X = X, FUN = FUN, ...)
    4.       └─exampletestr (local) FUN(X[[i]], ...)
    5.         └─exampletestr::make_tests_shells_file("R/detect.R", pkg_dir, open = FALSE)
    6.           └─exampletestr:::exampletestr_document(usethis_quiet_init)
    7.             ├─withr::with_options(...)
    8.             │ └─base::force(code)
    9.             ├─utils::capture.output(roxygen2::roxygenize(proj_location))
   10.             │ └─base::withVisible(...elt(i))
   11.             └─roxygen2::roxygenize(proj_location)
   12.               └─roxygen2 (local) load_code(base_path)
   13.                 └─pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
   14.                   └─cli::cli_inform(c(i = "Loading {.pkg {package}}"))
   15.                     ├─rlang::inform(...)
   16.                     │ └─message %||% ""
   17.                     └─cli::format_message(message, .envir = .envir)
   18.                       └─cli:::fmt(...)
   19.                         └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   20.                           ├─base::do.call(app[[msg$type]], msg$args)
   21.                           └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-15", class = NULL)
   22.                             └─cli:::clii_bullets(app, text, id, class)
   23.                               └─base::lapply(...)
   24.                                 └─cli (local) FUN(X[[i]], ...)
   25.                                   └─app$text(text[[i]])
   26.                                     └─cli:::clii_text(app, text)
   27.                                       └─app$xtext(text)
   28.                                         └─cli:::clii__xtext(...)
   29.                                           └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   30.                                             └─base::lapply(pars, ansi_trimws)
   31.                                               └─cli (local) FUN(X[[i]], ...)
  ── Error (test-functions.R:43:3): `make_tests_shell_fun()` works ───────────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. └─exampletestr::make_test_shell_fun(...) at test-functions.R:43:2
    2.   └─exampletestr:::exampletestr_document(usethis_quiet_init)
    3.     ├─withr::with_options(...)
    4.     │ └─base::force(code)
    5.     ├─utils::capture.output(roxygen2::roxygenize(proj_location))
    6.     │ └─base::withVisible(...elt(i))
    7.     └─roxygen2::roxygenize(proj_location)
    8.       └─roxygen2 (local) load_code(base_path)
    9.         └─pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
   10.           └─cli::cli_inform(c(i = "Loading {.pkg {package}}"))
   11.             ├─rlang::inform(...)
   12.             │ └─message %||% ""
   13.             └─cli::format_message(message, .envir = .envir)
   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-24140-22", 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-shell-creation.R:18:3): `make_test_shell()` works ───────────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test-shell-creation.R:18:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─exampletestr:::make_test_shell(...)
    5. │ └─checkmate::assert_character(example_block)
    6. │   └─checkmate::checkCharacter(...)
    7. │     └─... %and% ...
    8. │       └─base::isTRUE(lhs)
    9. └─exampletestr:::extract_examples("R/detect.R", pkg_dir = pkg_dir)
   10.   └─exampletestr:::exampletestr_document(usethis_quiet_init)
   11.     ├─withr::with_options(...)
   12.     │ └─base::force(code)
   13.     ├─utils::capture.output(roxygen2::roxygenize(proj_location))
   14.     │ └─base::withVisible(...elt(i))
   15.     └─roxygen2::roxygenize(proj_location)
   16.       └─roxygen2 (local) load_code(base_path)
   17.         └─pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
   18.           └─cli::cli_inform(c(i = "Loading {.pkg {package}}"))
   19.             ├─rlang::inform(...)
   20.             │ └─message %||% ""
   21.             └─cli::format_message(message, .envir = .envir)
   22.               └─cli:::fmt(...)
   23.                 └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   24.                   ├─base::do.call(app[[msg$type]], msg$args)
   25.                   └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-29", class = NULL)
   26.                     └─cli:::clii_bullets(app, text, id, class)
   27.                       └─base::lapply(...)
   28.                         └─cli (local) FUN(X[[i]], ...)
   29.                           └─app$text(text[[i]])
   30.                             └─cli:::clii_text(app, text)
   31.                               └─app$xtext(text)
   32.                                 └─cli:::clii__xtext(...)
   33.                                   └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   34.                                     └─base::lapply(pars, ansi_trimws)
   35.                                       └─cli (local) FUN(X[[i]], ...)
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 10 ]
  Error: Test failures
  Execution halted