diff --git a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java index 8f8ca1337..015efde43 100644 --- a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java +++ b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java @@ -130,4 +130,12 @@ public class SplitUserIdTest { Assert.assertEquals("this is a comment", info.comment); } -} \ No newline at end of file + @Test + public void splitUserIdWithInvalidEmailShouldReturnEmail() { + OpenPgpUtils.UserId info = KeyRing.splitUserId("Name@LooksLike.Email "); + Assert.assertEquals("Name@LooksLike.Email", info.name); + Assert.assertEquals("Name@LooksLikeEmail", info.email); + Assert.assertNull(info.comment); + } + +}