Recognize mail as alternative to email (#1629)

* Recognize mail as alternative to email

* Add test

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Ivan Tham 2021-12-29 17:57:28 +08:00 committed by GitHub
parent 05f9e976ed
commit 8b5be3f785
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -216,6 +216,7 @@ constructor(
"user:",
"account:",
"email:",
"mail:",
"name:",
"handle:",
"id:",

View file

@ -119,6 +119,7 @@ class PasswordEntryTest {
assertEquals("foo@example.com", makeEntry("\nemail: foo@example.com").username)
assertEquals("username", makeEntry("\nidentity: username\nlogin: another_username").username)
assertEquals("username", makeEntry("\nLOGiN:username").username)
assertEquals("foo@example.com", makeEntry("pass\nmail: foo@example.com").username)
assertNull(makeEntry("secret\nextra\ncontent\n").username)
}