tests a list of source packages
Usage
pkgs_test(
pkgids = names(filter_srcpkgs(src_pkgs, filter)),
src_pkgs = get_srcpkgs(),
filter = NULL,
quiet = TRUE,
...
)Examples
## create a dummy collection of srcpkgs by replicating the dummy srcpkg
pkg <- setup_and_get_dummy_srcpkg()
pkgs <- srcpkgs(list(pkg, pkg))
res <- pkgs_test(pkgs, error_on = "never")
#> ✔ | F W S OK | Context
#>
#> ⠏ | 0 | failure
#> ✖ | 1 0 | failure
#> ────────────────────────────────────────────────────────────────────────────────
#> Failure (test_failure.R:3:3): does_nothing_special - failure
#> does_nothing_special() not equal to 0.
#> 1/1 mismatches
#> [1] 42 - 0 == 42
#> ────────────────────────────────────────────────────────────────────────────────
#>
#> ⠏ | 0 | success
#> ✔ | 1 | success
#>
#> ══ Results ═════════════════════════════════════════════════════════════════════
#> ── Failed tests ────────────────────────────────────────────────────────────────
#> Failure (test_failure.R:3:3): does_nothing_special - failure
#> does_nothing_special() not equal to 0.
#> 1/1 mismatches
#> [1] 42 - 0 == 42
#>
#> [ FAIL 1 | WARN 0 | SKIP 0 | PASS 1 ]
#> ✔ | F W S OK | Context
#>
#> ⠏ | 0 | failure
#> ✖ | 1 0 | failure
#> ────────────────────────────────────────────────────────────────────────────────
#> Failure (test_failure.R:3:3): does_nothing_special - failure
#> does_nothing_special() not equal to 0.
#> 1/1 mismatches
#> [1] 42 - 0 == 42
#> ────────────────────────────────────────────────────────────────────────────────
#>
#> ⠏ | 0 | success
#> ✔ | 1 | success
#>
#> ══ Results ═════════════════════════════════════════════════════════════════════
#> ── Failed tests ────────────────────────────────────────────────────────────────
#> Failure (test_failure.R:3:3): does_nothing_special - failure
#> does_nothing_special() not equal to 0.
#> 1/1 mismatches
#> [1] 42 - 0 == 42
#>
#> [ FAIL 1 | WARN 0 | SKIP 0 | PASS 1 ]
print(res)
#>
#> ── Test results by package ─────────────────────────────────────────────────────
#> ╒════════════╤══╤══════╤══════╤═══════╤═════╤═══════╤═════╕
#> │ package │nb│failed│passed│skipped│error│warning│ time│
#> ╞════════════╪══╪══════╪══════╪═══════╪═════╪═══════╪═════╡
#> │dummy.srcpkg│ 2│ 1 │ 1 │ 0 │ 0 │ 0 │0.014│
#> │dummy.srcpkg│ 2│ 1 │ 1 │ 0 │ 0 │ 0 │0.013│
#> ╘════════════╧══╧══════╧══════╧═══════╧═════╧═══════╧═════╛
#>
#> ── Test results overview ───────────────────────────────────────────────────────
#> ╒═══════╤══╤══════╤══════╤═══════╤═════╤═══════╤═════╕
#> │package│nb│failed│passed│skipped│error│warning│ time│
#> ╞═══════╪══╪══════╪══════╪═══════╪═════╪═══════╪═════╡
#> │ 2 │ 4│ 2 │ 2 │ 0 │ 0 │ 0 │0.027│
#> ╘═══════╧══╧══════╧══════╧═══════╧═════╧═══════╧═════╛
#>
#> FAILED