mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
fix: 修复 SFTP 格式化进度可能报错的问题
This commit is contained in:
14
src/test/kotlin/app/termora/StringFormatTest.kt
Normal file
14
src/test/kotlin/app/termora/StringFormatTest.kt
Normal 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) }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user