fix: 修复 SFTP 格式化进度可能报错的问题

This commit is contained in:
hstyi
2025-01-10 12:31:45 +08:00
committed by hstyi
parent 5733b5f485
commit 9d4562e7e3
2 changed files with 15 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
package app.termora
import org.junit.jupiter.api.assertDoesNotThrow
import java.util.*
import kotlin.test.Test
import kotlin.test.assertFailsWith
class StringFormatTest {
@Test
fun test() {
assertFailsWith(IllegalFormatConversionException::class) { String.format("%.0f%%", 99) }
assertDoesNotThrow { String.format("%.0f%%", 99.0) }
}
}