Skip to content

Commit bea51d0

Browse files
committed
Less verbose output in testGuideBasicExample05 (100k dots were printed)
1 parent ed69854 commit bea51d0

File tree

1 file changed

+7
-1
lines changed
  • kotlinx-coroutines-core/src/test/kotlin/guide/test

1 file changed

+7
-1
lines changed

kotlinx-coroutines-core/src/test/kotlin/guide/test/TestUtil.kt

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ fun test(name: String, block: () -> Unit): List<String> {
5454

5555
}
5656
val lines = ByteArrayInputStream(bytes).bufferedReader().readLines()
57-
lines.forEach { println(it) }
57+
lines.forEach {
58+
val limit = 80
59+
if (it.length < limit)
60+
println(it)
61+
else
62+
println(it.substring(0, limit) + " (${it.length} chars)")
63+
}
5864
return lines
5965
}
6066

0 commit comments

Comments
 (0)