From 9b3dfe48d72b626ceae6af1c493680a01d0c0431 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Tue, 11 Apr 2023 09:01:04 -0500 Subject: [PATCH 1/4] Don't quote snapshots --- DESCRIPTION | 2 +- NEWS.md | 2 ++ R/snapshot-reporter.R | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7383c103d..e66969ecf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,7 +35,7 @@ Imports: R6 (>= 2.2.0), rlang (>= 1.1.0), utils, - waldo (>= 0.4.0), + waldo (>= 0.4.1), withr (>= 2.4.3) Suggests: covr, diff --git a/NEWS.md b/NEWS.md index a7e4987c2..6119b1b13 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # testthat (development version) +* `expect_snapshot()` differences no longer use quotes. + * `source_file()`, which is used by various parts of the helper and setup/teardown machinery, now reports the file name in the case of errors (#1704). diff --git a/R/snapshot-reporter.R b/R/snapshot-reporter.R index ba547458a..66a757510 100644 --- a/R/snapshot-reporter.R +++ b/R/snapshot-reporter.R @@ -57,7 +57,8 @@ SnapshotReporter <- R6::R6Class("SnapshotReporter", x = old, x_arg = "old", y = value, y_arg = "new", ..., - tolerance = tolerance + tolerance = tolerance, + quote_strings = FALSE ) if (length(comp) > 0L) { From 7d156f113ed3587e3554286ca831b801d7fbc0e1 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Wed, 12 Apr 2023 09:04:36 -0500 Subject: [PATCH 2/4] Use dev waldo --- DESCRIPTION | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index e66969ecf..c2f5505d8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,7 +35,7 @@ Imports: R6 (>= 2.2.0), rlang (>= 1.1.0), utils, - waldo (>= 0.4.1), + waldo (>= 0.4.0.9000), withr (>= 2.4.3) Suggests: covr, @@ -56,3 +56,5 @@ Config/testthat/start-first: watcher, parallel* Encoding: UTF-8 Roxygen: list(markdown = TRUE, r6 = FALSE) RoxygenNote: 7.2.3 +Remotes: + r-lib/waldo From c811a66c196f5534ab6b0d42f84f075a78b1bfc0 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 1 May 2023 10:56:58 -0500 Subject: [PATCH 3/4] Use CRAN waldo --- DESCRIPTION | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c2f5505d8..128fb0e1b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,7 +35,7 @@ Imports: R6 (>= 2.2.0), rlang (>= 1.1.0), utils, - waldo (>= 0.4.0.9000), + waldo (>= 0.5.0), withr (>= 2.4.3) Suggests: covr, @@ -56,5 +56,3 @@ Config/testthat/start-first: watcher, parallel* Encoding: UTF-8 Roxygen: list(markdown = TRUE, r6 = FALSE) RoxygenNote: 7.2.3 -Remotes: - r-lib/waldo From a610f9688effae2fa8c2c187d532f125a0a47a74 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 1 May 2023 10:58:17 -0500 Subject: [PATCH 4/4] Fix merge error --- NEWS.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 9ecf573d7..6254d30f2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,9 +2,6 @@ * `expect_snapshot()` differences no longer use quotes. -* `source_file()`, which is used by various parts of the helper and - setup/teardown machinery, now reports the file name in the case of - errors (#1704). * `expect_error()`, `expect_warning()`, and `expect_message()` now correctly enforce that the condition is of the expected base class (e.g. error, warning, messsage) even when the `class` argument is used (#1168).