Merge pull request #2699 from android-password-store/accept-invalid-emails

Bump openpgp-api and add a test for TLD-less email
This commit is contained in:
Dominik Schürmann
2021-05-02 19:30:02 +02:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

View File

@@ -130,4 +130,12 @@ public class SplitUserIdTest {
Assert.assertEquals("this is a comment", info.comment);
}
@Test
public void splitUserIdWithEmailWithoutTldShouldReturnNameAndEmail() {
OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann <max@localhost>");
Assert.assertEquals("Max Mustermann", info.name);
Assert.assertEquals("max@localhost", info.email);
Assert.assertNull(info.comment);
}
}