File: test-load-collate.r

package info (click to toggle)
r-cran-pkgload 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 788 kB
  • sloc: ansic: 30; sh: 13; cpp: 9; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 561 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
context("Load: collate")

test_that("If collate absent, load in alphabetical order", {
  load_all("testCollateAbsent")

  expect_equal(a, 3)

  unload("testCollateAbsent")
})

test_that("Warned about files missing from collate, but they're still loaded", {
  expect_message(load_all("testCollateMissing"), "a.r")

  expect_equal(a, 1)
  expect_equal(b, 2)

  unload("testCollateMissing")
})

test_that("Extra files in collate don't error, but warn", {
  expect_message(load_all("testCollateExtra"), "b.r")

  expect_equal(a, 1)

  unload("testCollateExtra")
})