Running 'spelling.R' [0s]
  Running 'testthat.R' [16s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(devtools)
  Loading required package: usethis
  
  Attaching package: 'devtools'
  
  The following object is masked from 'package:testthat':
  
      test_file
  
  > 
  > test_check("devtools")
  
  
  
  [ FAIL 6 | WARN 0 | SKIP 9 | PASS 36 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • !interactive() is TRUE (1)
  • On CRAN (8)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-run-examples.R:3:3): Can run an example ─────────────────────────
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. ├─testthat::expect_output(...) at test-run-examples.R:3:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(path, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. ├─base::suppressMessages(run_examples(pkg = pkg, document = FALSE))
   11. │ └─base::withCallingHandlers(...)
   12. └─devtools::run_examples(pkg = pkg, document = FALSE)
   13.   └─devtools::load_all(pkg$path, reset = TRUE, export_all = FALSE)
   14.     └─pkgload::load_all(...)
   15.       └─cli::cli_inform(c(i = "Loading {.pkg {package}}"))
   16.         ├─rlang::inform(...)
   17.         │ └─message %||% ""
   18.         └─cli::format_message(message, .envir = .envir)
   19.           └─cli:::fmt(...)
   20.             └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   21.               ├─base::do.call(app[[msg$type]], msg$args)
   22.               └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-14", class = NULL)
   23.                 └─cli:::clii_bullets(app, text, id, class)
   24.                   └─base::lapply(...)
   25.                     └─cli (local) FUN(X[[i]], ...)
   26.                       └─app$text(text[[i]])
   27.                         └─cli:::clii_text(app, text)
   28.                           └─app$xtext(text)
   29.                             └─cli:::clii__xtext(...)
   30.                               └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   31.                                 └─base::lapply(pars, ansi_trimws)
   32.                                   └─cli (local) FUN(X[[i]], ...)
  ── Error (test-test.R:18:3): Package can be tested with testthat not on search path ──
  Error in `nchar(xs)`: number of characters is not computable in "bytes" encoding, element 1
  Backtrace:
       ▆
    1. └─devtools (local) test_test(pkg1) at test-test.R:18:2
    2.   ├─base::suppressMessages(test(..., reporter = "silent")) at test-test.R:2:2
    3.   │ └─base::withCallingHandlers(...)
    4.   └─devtools::test(..., reporter = "silent")
    5.     └─devtools::load_all(pkg$path)
    6.       └─pkgload::load_all(...)
    7.         └─cli::cli_inform(c(i = "Loading {.pkg {package}}"))
    8.           ├─rlang::inform(...)
    9.           │ └─message %||% ""
   10.           └─cli::format_message(message, .envir = .envir)
   11.             └─cli:::fmt(...)
   12.               └─cli:::cli__fmt(rec, collapse, strip_newline, app)
   13.                 ├─base::do.call(app[[msg$type]], msg$args)
   14.                 └─cli (local) `<fn>`(text = `<named list>`, id = "cli-24140-21", class = NULL)
   15.                   └─cli:::clii_bullets(app, text, id, class)
   16.                     └─base::lapply(...)
   17.                       └─cli (local) FUN(X[[i]], ...)
   18.                         └─app$text(text[[i]])
   19.                           └─cli:::clii_text(app, text)
   20.                             └─app$xtext(text)
   21.                               └─cli:::clii__xtext(...)
   22.                                 └─cli::ansi_strwrap(text, exdent = exdent, width = app$get_width(extra = padding))
   23.                                   └─base::lapply(pars, ansi_trimws)
   24.                                     └─cli (local) FUN(X[[i]], ...)
  ── Error (test-test.R:24:1): (code run outside of `test_that()`) ───────────────
  Error in `test_that("Filtering works with devtools::test", {
      out <- test_test(test_path("testTest"), filter = "dummy")
      expect_equal(length(out), 1)
  })`: could not find function "test_that"
  ── Error (test-uninstall.R:1:1): (code run outside of `test_that()`) ───────────
  Error in `test_that("uninstall() unloads and removes from library", {
      withr::local_temp_libpaths()
      install(test_path("testHelp"), quiet = TRUE)
      expect_true(require(testHelp, quietly = TRUE))
      expect_true("testHelp" %in% loaded_packages()$package)
      uninstall(test_path("testHelp"), quiet = TRUE)
      expect_false("testHelp" %in% loaded_packages()$package)
      suppressWarnings(expect_false(require(testHelp, quietly = TRUE)))
  })`: could not find function "test_that"
  ── Error (test-utils.R:1:1): (code run outside of `test_that()`) ───────────────
  Error in `test_that("case-insensitive sort order", {
      expect_equal(sort_ci(rev(letters)), letters)
      expect_equal(sort_ci(rev(LETTERS)), LETTERS)
      expect_equal(sort_ci(c(letters[1:3], LETTERS[1:3])), c("A", 
          "a", "B", "b", "C", "c"))
  })`: could not find function "test_that"
  ── Error (test-vignettes.R:1:1): (code run outside of `test_that()`) ───────────
  Error in `test_that("Sweave vignettes copied into doc", {
      if (!pkgbuild::has_latex()) {
          skip("pdflatex not available")
      }
      pkg <- test_path("testVignettes")
      doc <- path(pkg, "doc")
      suppressMessages(clean_vignettes(pkg))
      expect_false(dir_exists(doc))
      suppressMessages(build_vignettes(pkg))
      expect_setequal(path_file(dir_ls(doc)), c("new.pdf", "new.R", 
          "new.Rnw"))
      suppressMessages(clean_vignettes(pkg))
      expect_false(dir_exists(doc))
  })`: could not find function "test_that"
  
  [ FAIL 6 | WARN 0 | SKIP 9 | PASS 36 ]
  Error: Test failures
  Execution halted