Running 'testthat.R' [68s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(styler)
  > test_check("styler") # checks multiple files, in parallel
  Starting 2 test processes
  [ FAIL 1 | WARN 2 | SKIP 25 | PASS 536 ]
  
  ══ Skipped tests (25) ══════════════════════════════════════════════════════════
  • DiagrammeR cannot be loaded (3): 'test-create_tree.R:2:3',
    'test-create_tree.R:13:3', 'test-relocate_eq_assign.R:3:3'
  • On CRAN (21): 'test-cache-clean-up.R:2:3', 'test-cache-high-level-api.R:3:3',
    'test-cache-high-level-api.R:29:3', 'test-cache-high-level-api.R:40:3',
    'test-cache-high-level-api.R:60:3', 'test-cache-high-level-api.R:74:3',
    'test-cache-high-level-api.R:91:3', 'test-cache-high-level-api.R:99:3',
    'test-cache-high-level-api.R:139:3', 'test-cache-high-level-api.R:152:3',
    'test-cache-with-r-cache.R:32:3', 'test-helpers.R:3:3',
    'test-helpers.R:14:3', 'test-public_api-1.R:108:9', 'test-roundtrip.R:13:3',
    'test-roundtrip.R:19:3', 'test-public_api-3.R:164:3', 'test-utils.R:9:3',
    'test-zzz.R:3:3', 'tests-cache-require-serial.R:22:3',
    'tests-cache-require-serial.R:33:3'
  • Running in parallel (1): 'test-cache-clean-up.R:15:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-parsing.R:59:3'): mixed CRLF / LF EOLs fail ────────────────────
  Error in `parse_safely(text, keep.source = TRUE)`: <text>:2:6: unexpected invalid token
  1: a + 3 -4 -> x
  2: x + 2
          ^
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-parsing.R:59:3
    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. ├─styler::style_text("a + 3 -4 -> x\nx + 2\r\n glück + 1")
    8. │ └─styler (local) transformer(text)
    9. │   └─text %>% ...
   10. ├─styler:::parse_transform_serialize_r(...)
   11. │ └─styler::compute_parse_data_nested(text, transformers, more_specs)
   12. │   └─styler:::text_to_flat_pd(text, transformers, more_specs = more_specs)
   13. │     ├─... %>% shallowify()
   14. │     └─styler:::tokenize(text)
   15. │       ├─... %>% enhance_mapping_special()
   16. │       └─styler:::get_parse_data(text, include_text = TRUE)
   17. │         └─styler:::parse_safely(text, keep.source = TRUE)
   18. │           └─rlang::abort(tried_parsing$message)
   19. ├─styler:::shallowify(.)
   20. ├─styler:::add_attributes_caching(., transformers, more_specs = more_specs)
   21. │ └─base::nrow(pd_flat)
   22. ├─styler:::add_stylerignore(.)
   23. │ └─base::trimws(pd_flat$text)
   24. │   ├─base (local) mysub(...)
   25. │   │ └─base::sub(re, "", x, perl = TRUE)
   26. │   │   └─base::is.factor(x)
   27. │   └─base (local) mysub(paste0("^", whitespace, "+"), x)
   28. │     └─base::sub(re, "", x, perl = TRUE)
   29. │       └─base::is.factor(x)
   30. ├─styler:::add_terminal_token_after(.)
   31. │ └─pd_flat %>% filter(terminal) %>% arrange_pos_id()
   32. ├─styler:::arrange_pos_id(.)
   33. ├─styler:::filter(., terminal)
   34. │ └─base::subset(.data, ...)
   35. ├─styler:::add_terminal_token_before(.)
   36. │ └─pd_flat %>% filter(terminal) %>% arrange_pos_id()
   37. ├─styler:::arrange_pos_id(.)
   38. ├─styler:::filter(., terminal)
   39. │ └─base::subset(.data, ...)
   40. ├─styler:::enhance_mapping_special(.)
   41. └─styler:::ensure_correct_txt(., text)
   42.   └─styler:::is_insufficiently_parsed_string(pd)
   43.     └─base::grepl("^\\[", pd$text)
   44.       └─base::is.factor(x)
  
  [ FAIL 1 | WARN 2 | SKIP 25 | PASS 536 ]
  Deleting unused snapshots:
  • public_api.md
  Error: Test failures
  Execution halted