Running ‘testthat.R’ [160s/180s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(precommit)
  > test_check("precommit")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • !is_windows() is TRUE (1)
  • On CRAN (2)
  • not_conda() is TRUE (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-hooks.R:251:1): (code run outside of `test_that()`) ───────────
  Expected: No error. Found:
  sh: git:  not found
  Error in system2("git", "status", stdout = TRUE) : 
    error in running command: 'Illegal seek'
  Calls: grepl -> is.factor -> system2
  Execution halted
  Backtrace:
      █
   1. └─precommit:::run_test("lintr", suffix = "-success.R", error_msg = NULL) test-hooks.R:251:0
   2.   └─precommit:::run_test_impl(...)
   3.     └─precommit:::hook_state_assert(...)
   4.       └─purrr::map2(...)
   5.         └─precommit:::.f(.x[[1L]], .y[[1L]], ...)
  ── Failure (test-hooks.R:257:1): (code run outside of `test_that()`) ───────────
  paste(contents, collapse = "\n") does not match "not lint free".
  Actual value: "sh: git:  not found\nError in system2("git", "status", stdout = TRUE) : \n  error in running command: 'Illegal seek'\nCalls: grepl -> is.factor -> system2\nExecution halted"
  Backtrace:
      █
   1. └─precommit:::run_test("lintr", suffix = "-fail.R", error_msg = "not lint free") test-hooks.R:257:0
   2.   └─precommit:::run_test_impl(...)
   3.     └─precommit:::hook_state_assert(...)
   4.       └─purrr::map2(...)
   5.         └─precommit:::.f(.x[[1L]], .y[[1L]], ...)
   6.           └─testthat::expect_match(...)
   7.             └─testthat:::expect_match_(...)
  ── Failure (test-hooks.R:260:1): (code run outside of `test_that()`) ───────────
  Expected: No error. Found:
  sh: git:  not found
  Error in system2("git", "status", stdout = TRUE) : 
    error in running command: 'Illegal seek'
  Calls: grepl -> is.factor -> system2
  Execution halted
  Backtrace:
      █
   1. └─precommit:::run_test(...) test-hooks.R:260:0
   2.   └─precommit:::run_test_impl(...)
   3.     └─precommit:::hook_state_assert(...)
   4.       └─purrr::map2(...)
   5.         └─precommit:::.f(.x[[1L]], .y[[1L]], ...)
  ── Failure (test-hooks.R:285:1): (code run outside of `test_that()`) ───────────
  Expected: No error. Found:
  sh: git:  not found
  Error in system2("git", c("diff --cached --name-only"), stdout = TRUE) : 
    error in running command: 'Illegal seek'
  Execution halted
  Backtrace:
      █
   1. └─precommit:::run_test(...) test-hooks.R:285:0
   2.   └─precommit:::run_test_impl(...)
   3.     └─precommit:::hook_state_assert(...)
   4.       └─purrr::map2(...)
   5.         └─precommit:::.f(.x[[i]], .y[[i]], ...)
  ── Failure (test-hooks.R:285:1): (code run outside of `test_that()`) ───────────
  Expected: No error. Found:
  sh: git:  not found
  Error in system2("git", c("diff --cached --name-only"), stdout = TRUE) : 
    error in running command: 'Illegal seek'
  Execution halted
  Backtrace:
      █
   1. └─precommit:::run_test(...) test-hooks.R:285:0
   2.   └─precommit:::run_test_impl(...)
   3.     └─precommit:::hook_state_assert(...)
   4.       └─purrr::map2(...)
   5.         └─precommit:::.f(.x[[i]], .y[[i]], ...)
  ── Failure (test-hooks.R:323:1): (code run outside of `test_that()`) ───────────
  paste(contents, collapse = "\n") does not match "should be both staged".
  Actual value: "sh: git:  not found\nError in system2("git", c("diff --cached --name-only"), stdout = TRUE) : \n  error in running command: 'Illegal seek'\nExecution halted"
  Backtrace:
      █
   1. └─precommit:::run_test(...) test-hooks.R:323:0
   2.   └─precommit:::run_test_impl(...)
   3.     └─precommit:::hook_state_assert(...)
   4.       └─purrr::map2(...)
   5.         └─precommit:::.f(.x[[i]], .y[[i]], ...)
   6.           └─testthat::expect_match(...)
   7.             └─testthat:::expect_match_(...)
  ── Failure (test-hooks.R:323:1): (code run outside of `test_that()`) ───────────
  paste(contents, collapse = "\n") does not match "should be both staged".
  Actual value: "sh: git:  not found\nError in system2("git", c("diff --cached --name-only"), stdout = TRUE) : \n  error in running command: 'Illegal seek'\nExecution halted"
  Backtrace:
      █
   1. └─precommit:::run_test(...) test-hooks.R:323:0
   2.   └─precommit:::run_test_impl(...)
   3.     └─precommit:::hook_state_assert(...)
   4.       └─purrr::map2(...)
   5.         └─precommit:::.f(.x[[i]], .y[[i]], ...)
   6.           └─testthat::expect_match(...)
   7.             └─testthat:::expect_match_(...)
  
  [ FAIL 7 | WARN 0 | SKIP 4 | PASS 132 ]
  Error: Test failures
  Execution halted