tests/testthat/test-satisfies.R

test_that("CRAN packages", {

  ## Satisfies itself
  pkgs <- make_fake_resolution(
    `cran::pkgA` = list()
  )
  expect_true(satisfies_remote(pkgs[1,], pkgs[1,]))

  ## A certain version satisfies a ref without version requirements
  pkgs <- make_fake_resolution(
    `cran::pkgA` = list(),
    `cran::pkgA@2.0.0` = list()
  )
  expect_true(satisfies_remote(pkgs[1,], pkgs[2,]))
})

Try the pkgdepends package in your browser

Any scripts or data that you put into this service are public.

pkgdepends documentation built on May 29, 2024, 1:56 a.m.