Skip to content

Commit dcb2b4e

Browse files
committed
Remove OS-specific elements from tests
1 parent 94c979d commit dcb2b4e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

core/src/test/java/com/facebook/ktfmt/cli/MainTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class MainTest {
349349
.run()
350350

351351
assertThat(out.toString(UTF_8)).doesNotContain("hello, world")
352-
assertThat(out.toString(testCharset)).isEqualTo("<stdin>\n")
352+
assertThat(out.toString(testCharset)).isEqualTo("<stdin>${System.lineSeparator()}")
353353
}
354354

355355
@Test
@@ -460,7 +460,7 @@ class MainTest {
460460
.run()
461461

462462
assertThat(out.toString(UTF_8)).doesNotContain("hello, world")
463-
assertThat(out.toString(testCharset)).isEqualTo("<stdin>\n")
463+
assertThat(out.toString(testCharset)).isEqualTo("<stdin>${System.lineSeparator()}")
464464
assertThat(exitCode).isEqualTo(1)
465465
}
466466

core/src/test/java/com/facebook/ktfmt/cli/ParsedArgsTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class ParsedArgsTest {
287287
assertFailsWith<FileNotFoundException> {
288288
ParsedArgs.processArgs(arrayOf("@non-existing-file"))
289289
}
290-
assertThat(e.message).contains("non-existing-file (No such file or directory)")
290+
assertThat(e.message).contains("non-existing-file")
291291
}
292292

293293
@Test

0 commit comments

Comments
 (0)