diff --git a/idea/testData/quickfix/suppress/external/suppressActive.kt b/idea/testData/quickfix/suppress/external/suppressActive.kt new file mode 100644 index 00000000000..c3aa6c8c2ad --- /dev/null +++ b/idea/testData/quickfix/suppress/external/suppressActive.kt @@ -0,0 +1,8 @@ +// "Typo: Change to..." "false" +// TOOL: com.intellij.spellchecker.inspections.SpellCheckingInspection +// ACTION: Add 'const' modifier +// ACTION: Convert property initializer to getter +// ACTION: To raw string literal + +@Suppress("SpellCheckingInspection") +val str = "kjsghkjshtiurhuig" \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/external/suppressAvailable.kt b/idea/testData/quickfix/suppress/external/suppressAvailable.kt new file mode 100644 index 00000000000..e7e5b49a53d --- /dev/null +++ b/idea/testData/quickfix/suppress/external/suppressAvailable.kt @@ -0,0 +1,16 @@ +// "Suppress Warnings" "true" +// TOOL: com.intellij.spellchecker.inspections.SpellCheckingInspection +// ACTION: Add 'const' modifier +// ACTION: Typo: Change to... +// ACTION: Edit inspection profile setting +// ACTION: Fix all 'Typo' problems in file +// ACTION: Run inspection on ... +// ACTION: Disable inspection +// ACTION: Save 'kjsghkjshtiurhuig' to project-level dictionary +// ACTION: Show property type hints +// ACTION: Edit intention settings +// ACTION: Convert property initializer to getter +// ACTION: Inject language or reference +// ACTION: To raw string literal + +val str = "kjsghkjshtiurhuig" \ No newline at end of file diff --git a/idea/testData/quickfix/suppress/external/suppressAvailable.kt.after b/idea/testData/quickfix/suppress/external/suppressAvailable.kt.after new file mode 100644 index 00000000000..8fa8b38296c --- /dev/null +++ b/idea/testData/quickfix/suppress/external/suppressAvailable.kt.after @@ -0,0 +1,17 @@ +// "Suppress Warnings" "true" +// TOOL: com.intellij.spellchecker.inspections.SpellCheckingInspection +// ACTION: Add 'const' modifier +// ACTION: Typo: Change to... +// ACTION: Edit inspection profile setting +// ACTION: Fix all 'Typo' problems in file +// ACTION: Run inspection on ... +// ACTION: Disable inspection +// ACTION: Save 'kjsghkjshtiurhuig' to project-level dictionary +// ACTION: Show property type hints +// ACTION: Edit intention settings +// ACTION: Convert property initializer to getter +// ACTION: Inject language or reference +// ACTION: To raw string literal + +@Suppress("SpellCheckingInspection") +val str = "kjsghkjshtiurhuig" \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java index 51e0c7a3916..5dd4d35af59 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java @@ -3696,6 +3696,19 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes } } + @TestMetadata("idea/testData/quickfix/suppress/external") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class External extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExternal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/external"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/suppress/forStatement") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java index 5a7686c9f8a..f6a85de10ba 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java @@ -10286,6 +10286,29 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { } } + @TestMetadata("idea/testData/quickfix/suppress/external") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class External extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExternal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/external"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("suppressActive.kt") + public void testSuppressActive() throws Exception { + runTest("idea/testData/quickfix/suppress/external/suppressActive.kt"); + } + + @TestMetadata("suppressAvailable.kt") + public void testSuppressAvailable() throws Exception { + runTest("idea/testData/quickfix/suppress/external/suppressAvailable.kt"); + } + } + @TestMetadata("idea/testData/quickfix/suppress/forStatement") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)