From 3707d992c6b0e296840b22510d3d0a0d31245891 Mon Sep 17 00:00:00 2001 From: James Baird Date: Mon, 24 Jul 2023 21:26:24 +0100 Subject: [PATCH] Skip tests pre-native pipe support --- tests/testthat/test-pipe-consistency-linter.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testthat/test-pipe-consistency-linter.R b/tests/testthat/test-pipe-consistency-linter.R index 7498aa388..e6ad09224 100644 --- a/tests/testthat/test-pipe-consistency-linter.R +++ b/tests/testthat/test-pipe-consistency-linter.R @@ -1,4 +1,5 @@ test_that("pipe_consistency skips allowed usage", { + skip_if_not_r_version("4.1.0") expect_lint("1:3 %>% mean() %>% as.character()", NULL, pipe_consistency_linter()) expect_lint("1:3 |> mean() |> as.character()", NULL, pipe_consistency_linter()) # With no pipes @@ -12,6 +13,7 @@ test_that("pipe_consistency skips allowed usage", { }) test_that("pipe_consistency lints inconsistent usage", { + skip_if_not_r_version("4.1.0") expected_msg <- rex::rex("Use consistent pipe operators (either all %>% or all |>).") expect_lint( "1:3 |> mean() %>% as.character()",