Skip to content

Commit

Permalink
Merge pull request #486 from carpentries/fix-renv-test-484
Browse files Browse the repository at this point in the history
Fix test for {renv}
  • Loading branch information
zkamvar authored Jul 7, 2023
2 parents cde8907 + 84fd3cf commit cb3d6c4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sandpaper
Title: Create and Curate Carpentries Lessons
Version: 0.12.4
Version: 0.12.5
Authors@R: c(
person(given = "Zhian N.",
family = "Kamvar",
Expand Down
18 changes: 17 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# sandpaper 0.12.4 (unreleased)
# sandpaper 0.12.5 (unreleased)

## BUG FIX

* A broken test from the development version of {renv} fixed. This was a change
in output and not functionality, so there will be no user-visible changes
(reported: @zkamvar, #484; fixed: @zkamvar, #487).
* Broken snapshot tests from upstream R-devel have been fixed by ensuring that
version comparisons always use characters and not numbers (which is
ergonomically weird, but whatever) (reported: @zkamvar #487; fixed: @zkamvar
#487)

# sandpaper 0.12.4 (2023-06-16)

## BUG FIX

* A bug in walled systems where templated pages (e.g. 404) could not be written
due to permissions issues has been fixed (reported: @ocaisa, #479; fixed:
@zkamvar, #482).

# sandpaper 0.12.3 (2023-06-01)

## BUG FIX

* A bug where the git credentials are accidentally changed when a lesson is
built is fixed by no longer querying git author when the lesson is built.
(reported: @joelnitta, @velait, and @zkamvar, #449; fixed: @zkamvar, #476).
Expand Down
4 changes: 3 additions & 1 deletion R/check_pandoc.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ check_pandoc <- function(quiet = TRUE, pv = "2.11", rv = "1.4") {
} else {
# Are we in an RStudio session?
msg <- "{.pkg sandpaper} requires pandoc version {.field {pv}} or higher."
if (pan$version > 0) {
# This avoids spurious warnings in R > "4.3.0"
# See <https://bugs.r-project.org/show_bug.cgi?id=18548>
if (pan$version > "0") {
pan_msg <- "You have pandoc version {.field {panver}} in {.file {pandir}}"
} else {
pan_msg <- "You do not have pandoc installed on your PATH"
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-utils-callr.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ test_that("callr_build_episode_md() works with Rmarkdown using renv", {
path = t2, hash = NULL, workenv = new.env(),
outpath = o2, workdir = fs::path_dir(o2), root = lsn, quiet = TRUE
) %>%
expect_output("\\(lesson-requirements\\)")
expect_output("lesson-requirements") # Looking for a report of the lesson-requirements profile from {renv}
})
expect_true(fs::file_exists(o2))
# our R expression was evaluated
expect_match(grep("Hello", readLines(o2), value = TRUE), "Hello from R (version|Under)")
# The CSS code is evaluated
expect_match(grep("css", readLines(o2), value = TRUE), "style type=.text/css.")

})

0 comments on commit cb3d6c4

Please sign in to comment.