From 98fe8eaa42a2dcced1089a4c6a22a05ed74164cf Mon Sep 17 00:00:00 2001 From: Natalia Selezneva Date: Thu, 24 May 2018 14:30:08 +0300 Subject: [PATCH] Minor: add test that output at scratch line with spaces at the beginning is aligned properly --- idea/testData/scratch/spacesAtLineStart.comp.after | 3 +++ idea/testData/scratch/spacesAtLineStart.kts | 3 +++ idea/testData/scratch/spacesAtLineStart.repl.after | 3 +++ .../idea/scratch/ScratchRunActionTestGenerated.java | 10 ++++++++++ 4 files changed, 19 insertions(+) create mode 100644 idea/testData/scratch/spacesAtLineStart.comp.after create mode 100644 idea/testData/scratch/spacesAtLineStart.kts create mode 100644 idea/testData/scratch/spacesAtLineStart.repl.after diff --git a/idea/testData/scratch/spacesAtLineStart.comp.after b/idea/testData/scratch/spacesAtLineStart.comp.after new file mode 100644 index 00000000000..905e34d87cb --- /dev/null +++ b/idea/testData/scratch/spacesAtLineStart.comp.after @@ -0,0 +1,3 @@ +val a = 1 // RESULT: val a: Int +a // RESULT: 1 + a // RESULT: 1 diff --git a/idea/testData/scratch/spacesAtLineStart.kts b/idea/testData/scratch/spacesAtLineStart.kts new file mode 100644 index 00000000000..d3d7538a385 --- /dev/null +++ b/idea/testData/scratch/spacesAtLineStart.kts @@ -0,0 +1,3 @@ +val a = 1 +a + a \ No newline at end of file diff --git a/idea/testData/scratch/spacesAtLineStart.repl.after b/idea/testData/scratch/spacesAtLineStart.repl.after new file mode 100644 index 00000000000..a945cc8c9c2 --- /dev/null +++ b/idea/testData/scratch/spacesAtLineStart.repl.after @@ -0,0 +1,3 @@ +val a = 1 +a // RESULT: 1 + a // RESULT: 1 diff --git a/idea/tests/org/jetbrains/kotlin/idea/scratch/ScratchRunActionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/scratch/ScratchRunActionTestGenerated.java index 5615433d819..9ce0e1d1890 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/scratch/ScratchRunActionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/scratch/ScratchRunActionTestGenerated.java @@ -56,6 +56,11 @@ public class ScratchRunActionTestGenerated extends AbstractScratchRunActionTest runTest("idea/testData/scratch/simpleFun.kts"); } + @TestMetadata("spacesAtLineStart.kts") + public void testSpacesAtLineStart() throws Exception { + runTest("idea/testData/scratch/spacesAtLineStart.kts"); + } + @TestMetadata("stdlibFun.kts") public void testStdlibFun() throws Exception { runTest("idea/testData/scratch/stdlibFun.kts"); @@ -129,6 +134,11 @@ public class ScratchRunActionTestGenerated extends AbstractScratchRunActionTest runTest("idea/testData/scratch/simpleFun.kts"); } + @TestMetadata("spacesAtLineStart.kts") + public void testSpacesAtLineStart() throws Exception { + runTest("idea/testData/scratch/spacesAtLineStart.kts"); + } + @TestMetadata("stdlibFun.kts") public void testStdlibFun() throws Exception { runTest("idea/testData/scratch/stdlibFun.kts");