Skip to content

Commit 75453a4

Browse files
committed
test input assertions
1 parent 233517e commit 75453a4

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: githist
22
Title: Code analyses traced along the 'git' history of a package
3-
Version: 0.0.1.022
3+
Version: 0.0.1.023
44
Authors@R:
55
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2172-5265"))

codemeta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/ropensci-review-tools/githist",
99
"issueTracker": "https://github.com/ropensci-review-tools/githist/issues",
1010
"license": "https://spdx.org/licenses/GPL-3.0",
11-
"version": "0.0.1.022",
11+
"version": "0.0.1.023",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",

tests/testthat/test-testpkg.R

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
test_that ("testpkg", {
1+
test_that ("testpkg and input errors", {
2+
expect_error (githist (1))
3+
expect_error (githist ("a"))
4+
25
pkg <- system.file ("extdata", "testpkg.zip", package = "githist")
36
flist <- unzip (pkg, exdir = fs::path_temp ())
47
path <- fs::path_dir (flist [1])
58

6-
res <- githist (path)
9+
expect_error (githist (path, step_size = 1:2))
10+
expect_error (githist (path, step_size = "1"))
11+
12+
expect_output (
13+
res <- githist (path)
14+
)
715

816
expect_type (res, "list")
917
expect_length (res, 3L)

0 commit comments

Comments
 (0)