From 784803915e31c958a06a434f714b6e082bc9a865 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Tue, 3 Dec 2024 17:34:16 +0300 Subject: [PATCH] correct non-strict mode test --- .../line_breaks_top_level_exprs/non_strict-out.R | 11 +++++++++++ tests/testthat/test-line_breaks_top_level_exprs.R | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/testthat/line_breaks_top_level_exprs/non_strict-out.R b/tests/testthat/line_breaks_top_level_exprs/non_strict-out.R index 741c47309..4a18af903 100644 --- a/tests/testthat/line_breaks_top_level_exprs/non_strict-out.R +++ b/tests/testthat/line_breaks_top_level_exprs/non_strict-out.R @@ -1,12 +1,23 @@ f <- function() NULL + + + + + + g <- function() NULL + + f() # comment + + + g() diff --git a/tests/testthat/test-line_breaks_top_level_exprs.R b/tests/testthat/test-line_breaks_top_level_exprs.R index dd8c95da8..691c69d30 100644 --- a/tests/testthat/test-line_breaks_top_level_exprs.R +++ b/tests/testthat/test-line_breaks_top_level_exprs.R @@ -24,7 +24,7 @@ test_that("extra line breaks between braced expressions are removed", { test_that("extra line breaks are not removed in non-strict mode", { expect_no_warning( - test_collection("line_breaks_top_level_exprs", "non_strict", transformer = style_text) + test_collection("line_breaks_top_level_exprs", "non_strict", transformer = style_text, strict = FALSE) ) })