diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-05-22 20:53:41 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2021-05-22 21:23:47 +0530 |
commit | 38bf9d21235835999e0ca2e8a3e99f026dd5a487 (patch) | |
tree | d29dc084f3ae59e465ffdf36735e15aa06366e1d | |
parent | 50b481f304d60778283897f02e583125d35a824b (diff) |
format-common: replace deprecated functions
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r-- | format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt b/format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt index fad58be7..edf4dc10 100644 --- a/format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt +++ b/format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt @@ -7,6 +7,7 @@ package dev.msfjarvis.aps.data.passfile import dev.msfjarvis.aps.util.time.TestUserClock import dev.msfjarvis.aps.util.totp.TotpFinder +import java.util.Locale import kotlin.test.assertEquals import kotlin.test.assertNotNull import kotlin.test.assertNull @@ -34,7 +35,7 @@ internal class PasswordEntryTest { assertEquals("", makeEntry("").password) for (field in PasswordEntry.PASSWORD_FIELDS) { assertEquals("fooooo", makeEntry("\n$field fooooo").password) - assertEquals("fooooo", makeEntry("\n${field.toUpperCase()} fooooo").password) + assertEquals("fooooo", makeEntry("\n${field.uppercase(Locale.getDefault())} fooooo").password) assertEquals("fooooo", makeEntry("GOPASS-SECRET-1.0\n$field fooooo").password) assertEquals("fooooo", makeEntry("someFirstLine\nUsername: bar\n$field fooooo").password) } @@ -95,7 +96,10 @@ internal class PasswordEntryTest { fun testGetUsername() { for (field in PasswordEntry.USERNAME_FIELDS) { assertEquals("username", makeEntry("\n$field username").username) - assertEquals("username", makeEntry("\n${field.toUpperCase()} username").username) + assertEquals( + "username", + makeEntry("\n${field.uppercase(Locale.getDefault())} username").username + ) } assertEquals("username", makeEntry("secret\nextra\nlogin: username\ncontent\n").username) assertEquals("username", makeEntry("\nextra\nusername: username\ncontent\n").username) |