diff --git a/src/TextOutput.java b/src/TextOutput.java index 6a94a63..30f9337 100644 --- a/src/TextOutput.java +++ b/src/TextOutput.java @@ -99,7 +99,7 @@ public class TextOutput { System.out.print(word); if(!(currentWordNumber == lastWordNumber)) { System.out.print(" "); - currentLength = word.length(); + currentLength = word.length() + 1; } } } diff --git a/test/TextOutputTest.java b/test/TextOutputTest.java index 7aa6658..57bb624 100644 --- a/test/TextOutputTest.java +++ b/test/TextOutputTest.java @@ -27,5 +27,9 @@ class TextOutputTest { @Test public void print() { textOutput.print(text); + System.out.println("fertig"); + textOutput.formatRaw(); + textOutput.print(text); + System.out.println("fertig"); } } \ No newline at end of file