Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Write : TestBase() {
csvStr shouldStartWith """
name;age;city;weight;isHappy
"{""firstName"":""Alice"",""lastName"":""Cooper""}";15;London;54;true
""".rejoinWithSystemLineSeparator()
""".trimIndent().lines().joinToString(System.lineSeparator())
}

@Test
Expand All @@ -73,7 +73,7 @@ class Write : TestBase() {
"city": "London",
"weight": 54,
"isHappy": true
""".rejoinWithSystemLineSeparator()
""".trimIndent()
}

@Test
Expand Down Expand Up @@ -215,7 +215,7 @@ class Write : TestBase() {
// Specify mismatch subscriber
mismatchSubscriber = writeMismatchMessage,

).use { writer: ArrowWriter ->
).use { writer: ArrowWriter ->

// Save to any format and sink, like in the previous example
writer.writeArrowFeather(file)
Expand All @@ -241,10 +241,6 @@ class Write : TestBase() {
}

companion object {
private fun String.rejoinWithSystemLineSeparator() = rejoinWithLineSeparator(System.lineSeparator())

private fun String.rejoinWithLineSeparator(separator: String) = trimIndent().lines().joinToString(separator)

private fun useTempFile(action: (File) -> Unit) {
val file = kotlin.io.path.createTempFile("dataframeWriteTest")
action(file.toFile())
Expand Down
Loading