Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 8b5be3f

Browse files
pickfiremsfjarvis
andauthored
Recognize mail as alternative to email (#1629)
* Recognize mail as alternative to email * Add test Co-authored-by: Harsh Shandilya <[email protected]>
1 parent 05f9e97 commit 8b5be3f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

format-common/src/main/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntry.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ constructor(
216216
"user:",
217217
"account:",
218218
"email:",
219+
"mail:",
219220
"name:",
220221
"handle:",
221222
"id:",

format-common/src/test/kotlin/dev/msfjarvis/aps/data/passfile/PasswordEntryTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class PasswordEntryTest {
119119
assertEquals("[email protected]", makeEntry("\nemail: [email protected]").username)
120120
assertEquals("username", makeEntry("\nidentity: username\nlogin: another_username").username)
121121
assertEquals("username", makeEntry("\nLOGiN:username").username)
122+
assertEquals("[email protected]", makeEntry("pass\nmail: [email protected]").username)
122123
assertNull(makeEntry("secret\nextra\ncontent\n").username)
123124
}
124125

0 commit comments

Comments
 (0)