From 23bf69012d6235acf3e83f463033f43b8827b655 Mon Sep 17 00:00:00 2001 From: Albert Meltzer <7529386+kitbellew@users.noreply.github.com> Date: Thu, 23 Nov 2023 08:21:02 -0800 Subject: [PATCH] AvoidInfix: add tests for `of` --- .../test/resources/rewrite/AvoidInfix2.stat | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/scalafmt-tests/src/test/resources/rewrite/AvoidInfix2.stat b/scalafmt-tests/src/test/resources/rewrite/AvoidInfix2.stat index 27cdfb625f..cd5293c2ad 100644 --- a/scalafmt-tests/src/test/resources/rewrite/AvoidInfix2.stat +++ b/scalafmt-tests/src/test/resources/rewrite/AvoidInfix2.stat @@ -16,6 +16,30 @@ lst :+ foo // format: off lst :+ foo <<< default scalatest +runner.parser = source +=== +behavior of "..." { + a shouldBe b +} +behaviour of "..." { + a shouldBe b +} +behavi.or of "..." { + a shouldBe b +} +>>> +behavior.of("..." { + a shouldBe b +}) +behaviour.of("..." { + a shouldBe b +}) +behavi.or.of("..." { + a shouldBe b +}) +<<< #3699 1 +rewrite.neverInfix.excludeFilters = [ "shouldBe" ] +=== behavior of "..." { a shouldBe b } @@ -23,13 +47,30 @@ behavior of "..." { behavior.of("..." { a shouldBe b }) -<<< default scalatest with appended excludeFilters -rewrite.neverInfix.excludeFilters."+" = [ "of" ] +<<< #3699 2 +rewrite.neverInfix.excludeFilters = [ "of" ] === behavior of "..." { a shouldBe b } >>> +behavior of "..." { + a.shouldBe(b) +} +<<< #3699 3 +runner.parser = source +rewrite.neverInfix.excludeFilters = [ "behaviour\\.of" ] +=== behavior of "..." { a shouldBe b } +behaviour of "..." { + a shouldBe b +} +>>> +behavior.of("..." { + a.shouldBe(b) +}) +behaviour.of("..." { + a.shouldBe(b) +})