File: test-attach.R

package info (click to toggle)
r-cran-tidyverse 2.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 688 kB
  • sloc: sh: 11; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 487 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
test_that("if no packages, shows nothing", {
  expect_snapshot(cat(tidyverse_attach_message(character())))
})

test_that("message lists all core tidyverse packages", {
  local_mocked_bindings(package_version_h = function(x) "1.0.0")
  expect_snapshot(cat(tidyverse_attach_message(core)))
})

test_that("highlights dev versions in red", {
  local_reproducible_output(crayon = TRUE)

  expect_snapshot({
    highlight_version(c("1.0.0", "1.0.0.9000", "0.9000.0.9000", "1.0.0-rc"))
  })
})