From 0c959233cf6b9754abb20baa6ee752e991e05415 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Fri, 25 Oct 2024 11:56:32 -0700 Subject: [PATCH] Nitpicks to get totally clean R CMD check --- R/ansi-hyperlink.R | 2 +- R/cliapp-docs.R | 2 +- tests/testthat/_snaps/spark.md | 8 ++++---- tests/testthat/test-inline-2.R | 2 +- tests/testthat/test-spark.R | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/R/ansi-hyperlink.R b/R/ansi-hyperlink.R index 6dfe26866..209691721 100644 --- a/R/ansi-hyperlink.R +++ b/R/ansi-hyperlink.R @@ -409,7 +409,7 @@ ansi_hyperlink_types <- function() { vignette = FALSE ) - } else if (rs$hyperlink) { + } else if (isTRUE(rs$hyperlink)) { list( href = TRUE, run = structure(run, type = "rstudio"), diff --git a/R/cliapp-docs.R b/R/cliapp-docs.R index 70ae69fd6..1101344df 100644 --- a/R/cliapp-docs.R +++ b/R/cliapp-docs.R @@ -544,7 +544,7 @@ NULL #' convert relative paths, and paths starting with `~` to aboslute path. #' #' ```{asciicast links-file-1} -#' cli_text("... edit your {.file ~/.Rprofile} file.}") +#' cli_text("... edit your {.file ~/.Rprofile} file.") #' ``` #' #' ## Link text diff --git a/tests/testthat/_snaps/spark.md b/tests/testthat/_snaps/spark.md index e122ed239..f0c01d139 100644 --- a/tests/testthat/_snaps/spark.md +++ b/tests/testthat/_snaps/spark.md @@ -1,7 +1,7 @@ # spark_bar [plain] Code - spark_bar(seq(0, 1, length = 8)) + spark_bar(seq(0, 1, length.out = 8)) Output __,,**## Code @@ -12,7 +12,7 @@ # spark_bar [unicode] Code - spark_bar(seq(0, 1, length = 8)) + spark_bar(seq(0, 1, length.out = 8)) Output ▁▂▃▄▅▆▇█ Code @@ -23,14 +23,14 @@ # spark_line [plain] Code - spark_line(seq(0, 1, length = 10)) + spark_line(seq(0, 1, length.out = 10)) Output _,,-^ # spark_line [unicode] Code - spark_line(seq(0, 1, length = 10)) + spark_line(seq(0, 1, length.out = 10)) Output ⣀⡠⠔⠊⠉ diff --git a/tests/testthat/test-inline-2.R b/tests/testthat/test-inline-2.R index 1f3b8c272..c8b74829a 100644 --- a/tests/testthat/test-inline-2.R +++ b/tests/testthat/test-inline-2.R @@ -3,7 +3,7 @@ start_app() on.exit(stop_app(), add = TRUE) test_that_cli( - config = c("plain", "ansi"), + configs = c("plain", "ansi"), "quoting phrases that don't start or end with letter or number", { expect_snapshot(local({ diff --git a/tests/testthat/test-spark.R b/tests/testthat/test-spark.R index 95856c728..c91c92852 100644 --- a/tests/testthat/test-spark.R +++ b/tests/testthat/test-spark.R @@ -1,13 +1,13 @@ test_that_cli(configs = c("plain", "unicode"), "spark_bar", { expect_snapshot({ - spark_bar(seq(0, 1, length = 8)) + spark_bar(seq(0, 1, length.out = 8)) spark_bar(c(0, NA, 0.5, NA, 1)) }) }) test_that_cli(configs = c("plain", "unicode"), "spark_line", { expect_snapshot({ - spark_line(seq(0, 1, length = 10)) + spark_line(seq(0, 1, length.out = 10)) }) })