From c41169a3fc897c3549115294764684b47c4bfa8e Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Tue, 1 Aug 2023 17:05:45 +0000 Subject: [PATCH] new regression test --- tests/testthat/test-infix_spaces_linter.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/testthat/test-infix_spaces_linter.R b/tests/testthat/test-infix_spaces_linter.R index 40c1335fc..0d33b1446 100644 --- a/tests/testthat/test-infix_spaces_linter.R +++ b/tests/testthat/test-infix_spaces_linter.R @@ -185,3 +185,7 @@ test_that("native pipe is supported", { expect_lint("a |> foo()", NULL, linter) expect_lint("a|>foo()", rex::rex("Put spaces around all infix operators."), linter) }) + +test_that("mixed unary & binary operators aren't mis-lint", { + expect_lint("-1-1", rex::rex("Put spaces around all infix operators."), infix_spaces_linter()) +})