Skip to content

Commit

Permalink
Fix test strings to use manual string concat over triple-quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
yadobler committed Sep 10, 2024
1 parent db3a0c6 commit a43ca1d
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions src/test/java/yappingbot/ui/UiCliTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ class UiCliTest {
@Test
void testPrintError() throws IOException {

final String expected = """
| Error message here!
| Multiline Error Message
""";
final String expected = " | Error message here!\n"
+ " | Multiline Error Message\n";
TestHelper h = new TestHelper();
h.captureStdOut();
ui.printError("Error message here!\nMultiline Error Message");
Expand All @@ -28,15 +26,13 @@ void testPrintError() throws IOException {

@Test
void testPrint() throws IOException {
final String expected = """
| test 1
|
| multiline
| Allowed
""";
final String expected = " | test 1\n"
+ "\n"
+ " |\n"
+ "\n"
+ " | multiline\n"
+ " | Allowed\n"
+ "\n";
TestHelper h = new TestHelper();
h.captureStdOut();
ui.print("test 1");
Expand All @@ -48,14 +44,12 @@ void testPrint() throws IOException {

@Test
void testPrintln() throws IOException {
final String expected = """
| test 1
|
| multilineprevented
""";
final String expected = " | test 1\n"
+ "\n"
+ " |\n"
+ "\n"
+ " | multilineprevented\n"
+ "\n";
TestHelper h = new TestHelper();
h.captureStdOut();
ui.println("test 1");
Expand Down

0 comments on commit a43ca1d

Please sign in to comment.