diff --git a/skiko/src/commonTest/kotlin/org/jetbrains/skia/ParagraphTest.kt b/skiko/src/commonTest/kotlin/org/jetbrains/skia/ParagraphTest.kt index 22560206a..40ab5ae68 100644 --- a/skiko/src/commonTest/kotlin/org/jetbrains/skia/ParagraphTest.kt +++ b/skiko/src/commonTest/kotlin/org/jetbrains/skia/ParagraphTest.kt @@ -87,7 +87,6 @@ class ParagraphTest { } @Test - @SkipJsTarget // FIXME Emscripten's stringToUTF8 function does not correctly handle invalid unicode symbols. fun invalidUnicode() = runTest { val invalidUnicodeText = "🦊qwerty".substring(1) @@ -98,6 +97,17 @@ class ParagraphTest { assertEquals(1, paragraph.lineNumber) } + @Test + fun emptyString() = runTest { + // https://github.com/JetBrains/skiko/issues/963 + val paragraph = ParagraphBuilder(style, fontCollection()) + .pushStyle(TextStyle()) + .addText("") + .popStyle() + .build() + assertEquals("", paragraph.getText()) + } + @Test fun canCreate() = runTest { val text = "Hello,\n Пользователь1!"