Running 'testthat.R' [6s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(glossr)
  > 
  > test_check("glossr")
  [ FAIL 2 | WARN 4 | SKIP 3 | PASS 86 ]
  
  ══ Skipped tests (3) ═══════════════════════════════════════════════════════════
  • On CRAN (3): 'test-markdown.R:8:3', 'test-markdown.R:23:3',
    'test-markdown.R:39:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-gloss_render.R:17:3'): Classes are correct ─────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(gloss_lines, function(g) {
      g <- if (inherits(g, "flextable")) 
          g
      else gloss_table(g)
      flextable::flextable_to_rmd(g, ft.align = "left", print = FALSE)
  })`: i In index: 1.
  Caused by error in `setwd()`:
  ! character argument expected
  Backtrace:
       ▆
    1. ├─testthat::expect_s3_class(gloss_word(my_gloss), "gloss") at test-gloss_render.R:17:3
    2. │ └─testthat::quasi_label(enquo(object), arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─glossr::gloss_word(my_gloss)
    5. │ ├─... %>% unlist()
    6. │ └─purrr::map(...)
    7. │   └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    8. │     ├─purrr:::with_indexed_errors(...)
    9. │     │ └─base::withCallingHandlers(...)
   10. │     ├─purrr:::call_with_cleanup(...)
   11. │     └─glossr (local) .f(.x[[i]], ...)
   12. │       └─flextable::flextable_to_rmd(g, ft.align = "left", print = FALSE)
   13. │         └─knitr::knit_child(input = tmp_file, envir = environment(), quiet = TRUE)
   14. │           └─knitr::knit(..., tangle = opts_knit$get("tangle"), envir = envir)
   15. │             └─base::setwd(opts_knit$get("output.dir"))
   16. ├─base::unlist(.)
   17. └─base::.handleSimpleError(...)
   18.   └─purrr (local) h(simpleError(msg, call))
   19.     └─cli::cli_abort(...)
   20.       └─rlang::abort(...)
  ── Error ('test-gloss_render.R:76:3'): gloss label renders in word ─────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(gloss_lines, function(g) {
      g <- if (inherits(g, "flextable")) 
          g
      else gloss_table(g)
      flextable::flextable_to_rmd(g, ft.align = "left", print = FALSE)
  })`: i In index: 1.
  Caused by error in `setwd()`:
  ! character argument expected
  Backtrace:
       ▆
    1. ├─glossr::gloss_word(my_gloss) at test-gloss_render.R:76:3
    2. │ ├─... %>% unlist()
    3. │ └─purrr::map(...)
    4. │   └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    5. │     ├─purrr:::with_indexed_errors(...)
    6. │     │ └─base::withCallingHandlers(...)
    7. │     ├─purrr:::call_with_cleanup(...)
    8. │     └─glossr (local) .f(.x[[i]], ...)
    9. │       └─flextable::flextable_to_rmd(g, ft.align = "left", print = FALSE)
   10. │         └─knitr::knit_child(input = tmp_file, envir = environment(), quiet = TRUE)
   11. │           └─knitr::knit(..., tangle = opts_knit$get("tangle"), envir = envir)
   12. │             └─base::setwd(opts_knit$get("output.dir"))
   13. ├─base::unlist(.)
   14. └─base::.handleSimpleError(...)
   15.   └─purrr (local) h(simpleError(msg, call))
   16.     └─cli::cli_abort(...)
   17.       └─rlang::abort(...)
  
  [ FAIL 2 | WARN 4 | SKIP 3 | PASS 86 ]
  Error: Test failures
  Execution halted