Skip to content

Commit

Permalink
windows fix
Browse files Browse the repository at this point in the history
  • Loading branch information
osiegmar committed Oct 8, 2023
1 parent 3951e2c commit 819ee77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void escapeString(final String str) throws IOException {
writer.write("\\n");
break;
case '\r':
writer.write("\\r");
// Graylog doesn't like carriage-return: https://github.com/Graylog2/graylog2-server/issues/4470
break;
case '\t':
writer.write("\\t");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ public void newline() throws IOException {

@Test
public void carriageReturn() throws IOException {
enc.appendToJSON("aaa", "\r").close();
assertEquals("{\"aaa\":\"\\r\"}", writer.toString());
enc.appendToJSON("aaa", "\r\n").close();
assertEquals("{\"aaa\":\"\\n\"}", writer.toString());
}

@Test
Expand Down

0 comments on commit 819ee77

Please sign in to comment.