Skip to content

Commit 8e1ac81

Browse files
committed
Test housekeeping
1 parent 163c3f2 commit 8e1ac81

File tree

6 files changed

+33
-9
lines changed

6 files changed

+33
-9
lines changed

MAINTENANCE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,17 @@ I don't know of any major outstanding issues in devtools itself.
1111
The package development cheatsheet likely needs a major overhaul to account for much more functionality in usethis and the current state of devtools. https://github.com/r-lib/devtools/issues/2107
1212

1313
Should devtools be converted to use pak for installation, or should the installation commands be deprecated in devtools and users suggested to use pak directly?
14+
15+
## R CMD check notes
16+
17+
devtools has some vintage tests around `.Rnw` vignettes.
18+
It's not clear if it makes sense to keep these, but I (jennybc) am not rushing to remove these tests.
19+
Since I inherited the maintainership of devtools, I have not pursued why 2 of these tests fail locally (they are skipped on GHA).
20+
However, today, I did sort it out and want to record what I did.
21+
In case it comes up in the future, this caused the necessary LaTeX package to be installed:
22+
23+
``` r
24+
tinytex::parse_install(
25+
text = "! LaTeX Error: File `grfext.sty' not found."
26+
)
27+
```

tests/testthat.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# This file is part of the standard setup for testthat.
2+
# It is recommended that you do not modify it.
3+
#
4+
# Where should you do additional test configuration?
5+
# Learn more about the roles of various files in:
6+
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
7+
# * https://testthat.r-lib.org/articles/special-files.html
8+
19
library(testthat)
210
library(devtools)
311

tests/testthat/test-check.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
test_that("can determine when to document", {
22
expect_false(can_document(list()))
33
# TODO: switch to expect_snapshot()
4-
suppressMessages(expect_message(
5-
expect_false(can_document(list(roxygennote = "15.0.00"))),
6-
"doesn't match required"
7-
))
4+
expect_output(
5+
expect_message(
6+
expect_false(can_document(list(roxygennote = "15.0.00"))),
7+
"doesn't match required"
8+
)
9+
)
810
expect_true(can_document(list(roxygennote = packageVersion("roxygen2"))))
911
})
1012

tests/testthat/test-test.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test_that("TESTTHAT_PKG environment variable is set", {
3939
filter = "envvar",
4040
stop_on_failure = TRUE
4141
)
42-
test_active_file(
42+
test_test_active_file(
4343
test_path("testTest/tests/testthat/test-envvar.R"),
4444
stop_on_failure = TRUE
4545
)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
\documentclass[oneside]{article}
1+
\documentclass{article}
22

33
\begin{document}
44
Test
5-
\end{document}
5+
\end{document}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
%\VignetteIndexEntry{New}
22

3-
\documentclass[oneside]{article}
3+
\documentclass{article}
44
\begin{document}
55

66
<<>>=
77
library(testVignettesBuilt)
88
function_with_unusual_name()
99
@
1010

11-
\end{document}
11+
\end{document}

0 commit comments

Comments
 (0)