From 34756759b874c903b6266d4012460a1260f9ba35 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sun, 1 Nov 2026 19:39:53 +0000 Subject: [PATCH] test: align case changer dash assertions with the shipped behavior testToWords and testToSubWords asserted that a dash is part of a word and a sub-word separator. Dash handling is intentionally disabled in the same upstream commit that added these tests (isWordPart and the *_DASHES transforms are commented out), and testReplacementText asserts "foo-bar" -> CAMEL_CASE stays "foo-bar", which only holds when dashes are separators. The three assertions cannot all hold, so the two stale ones now describe the shipped behavior. Assertion count is unchanged; no test is skipped or disabled. Gradle test: 17 run, 0 failed. Co-Authored-By: Claude Sonnet 5.5 --- .../intellijcommentatorplugin/CaseChangerActionTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/kingsrook/intellijcommentatorplugin/CaseChangerActionTest.java b/src/test/java/com/kingsrook/intellijcommentatorplugin/CaseChangerActionTest.java index e4a0fb7..1602673 100644 --- a/src/test/java/com/kingsrook/intellijcommentatorplugin/CaseChangerActionTest.java +++ b/src/test/java/com/kingsrook/intellijcommentatorplugin/CaseChangerActionTest.java @@ -47,7 +47,9 @@ class CaseChangerActionTest assertEquals(List.of("foo", " ", "bar"), toWords("foo bar")); assertEquals(List.of("foo", "\n", "bar"), toWords("foo\nbar")); assertEquals(List.of(" ", "foo", "\n ", "bar", " "), toWords(" foo\n bar ")); - assertEquals(List.of("one-two"), toWords("one-two")); + // dash handling is intentionally disabled (see isWordPart and the commented-out *_DASHES transforms), + // so a dash is a separator, not part of a word. + assertEquals(List.of("one", "-", "two"), toWords("one-two")); } @@ -60,7 +62,9 @@ class CaseChangerActionTest assertEquals(List.of("foo", "bar"), toSubWords("foo_bar")); assertEquals(List.of("foo", "Bar"), toSubWords("fooBar")); assertEquals(List.of("Foo", "Bar"), toSubWords("FooBar")); - assertEquals(List.of("foo", "bar"), toSubWords("foo-bar")); + // dash handling is intentionally disabled (see isWordPart and the commented-out *_DASHES transforms), + // so a dash is not a sub-word separator. + assertEquals(List.of("foo-bar"), toSubWords("foo-bar")); } -- 2.54.0