Running ‘testthat.R’ [265s/307s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("rtables", reporter = "check")
  Loading required package: rtables
  Loading required package: formatters
  
  Attaching package: 'formatters'
  
  The following object is masked from 'package:base':
  
      %||%
  
  Loading required package: magrittr
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  
  Attaching package: 'rtables'
  
  The following object is masked from 'package:formatters':
  
      export_as_pdf
  
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  [ FAIL 6 | WARN 0 | SKIP 0 | PASS 1375 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-exporters.R:137:5'): export_as_pdf works ───────────────────────
  Error in `font_lcpi(font_family, font_size, cur_gpar$lineheight)`: could not find function "font_lcpi"
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-exporters.R:137:5
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─rtables::export_as_pdf(...)
  ── Failure ('test-pagination.R:371:5'): Pagination works with non-default min_siblings ──
  `paginate_table(tt, lpp = 3, min_siblings = 1)` threw an error with unexpected message.
  Expected match: "Unable to find any valid pagination between 1 and 1"
  Actual message: "Unable to find any valid pagination split between rows 1 and 1. \nInserted cpp (column-space, content per page) : 1\nNeed-to-repeat-in-each-page space (key values): 0\nRemaining space: 1\nCurrent space needed (with padding): 1"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-pagination.R:371:5
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─rtables::paginate_table(tt, lpp = 3, min_siblings = 1)
    7.   └─formatters::paginate_indices(...)
    8.     └─formatters::pag_indices_inner(...)
    9.       └─formatters:::find_pag(...)
   10.         └─formatters:::find_pag(...)
  ── Failure ('test-printing.R:149:5'): newline in column names and possibly cell values work ──
  matform2$strings[1:4, 1, drop = TRUE] not identical to c("Ethnicity", "  Factor2", "", "").
  4/4 mismatches
  x[1]: ""
  y[1]: "Ethnicity"
  
  x[2]: ""
  y[2]: "  Factor2"
  
  x[3]: "Ethnicity"
  y[3]: ""
  
  x[4]: "  Factor2"
  y[4]: ""
  ── Failure ('test-printing.R:419:5'): Cell and column label wrapping works in printing ──
  splitted_res[1:5] not identical to `expected`.
  2/5 mismatches
  x[4]: "              name  "
  y[4]: "            name to "
  
  x[5]: "             to be  "
  y[5]: "               be   "
  ── Failure ('test-printing.R:490:5'): row label indentation is kept even if there are newline characters ──
  `res_a <- toString(mf_a, widths = c(15, 12, 12))` threw an error with unexpected message.
  Expected match: "Inserted width\\(s\\) for column\\(s\\) 1 is\\(are\\) not wide enough for the desired indentation."
  Actual message: "Inserted width for row label column is not wide enough. We found the following rows that do not have at least indentation * ind_size + 1 characters to allow text to be shown after indentation: 5 7 10 12 15 17"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-printing.R:490:5
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─base::toString(mf_a, widths = c(15, 12, 12))
    7. └─formatters::toString(mf_a, widths = c(15, 12, 12))
    8.   └─formatters (local) .local(x, ...)
    9.     └─formatters:::do_cell_fnotes_wrap(...)
   10.       └─formatters:::.check_indentation(...)
  ── Error ('test-printing.R:492:5'): row label indentation is kept even if there are newline characters ──
  Error in `.check_indentation(mat, row_col_width = cell_widths_mat[, 1, 
      drop = TRUE])`: Inserted width for row label column is not wide enough. We found the following rows that do not have at least indentation * ind_size + 1 characters to allow text to be shown after indentation: 5 7 10 12 15 17
  Backtrace:
      ▆
   1. ├─base::toString(mf_a, widths = c(16, 12, 12)) at test-printing.R:492:5
   2. └─formatters::toString(mf_a, widths = c(16, 12, 12))
   3.   └─formatters (local) .local(x, ...)
   4.     └─formatters:::do_cell_fnotes_wrap(...)
   5.       └─formatters:::.check_indentation(...)
  
  [ FAIL 6 | WARN 0 | SKIP 0 | PASS 1375 ]
  Error: Test failures
  Execution halted