mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-26 12:58:02 +01:00
Fix User-ID format in documentation and note invalid user-id formats in tests
This commit is contained in:
parent
56abb51757
commit
223cf009fc
3 changed files with 6 additions and 4 deletions
|
@ -8,11 +8,10 @@ However, it is agreed upon to use the
|
|||
Below is a selection of possible User-IDs:
|
||||
|
||||
```
|
||||
Firstname Lastname <email@address.tld> [Comment]
|
||||
Firstname Lastname (Comment) <email@address.tld>
|
||||
Firstname Lastname
|
||||
Firstname Lastname [Comment]
|
||||
Firstname Lastname (Comment)
|
||||
<email@address.tld>
|
||||
<email@address.tld> [Comment]
|
||||
```
|
||||
|
||||
PGPainless comes with a builder class `UserId`, which can be used to safely construct User-IDs:
|
||||
|
@ -29,5 +28,5 @@ UserId full = UserId.newBuilder()
|
|||
.withEmail("peter@pgpainless.org")
|
||||
.withComment("Work Address")
|
||||
.build();
|
||||
assertEquals("Peter Pattern <peter@pgpainless.org> [Work Address]", full.toString());
|
||||
assertEquals("Peter Pattern (Work Address) <peter@pgpainless.org>", full.toString());
|
||||
```
|
|
@ -704,6 +704,8 @@ public class KeyRingInfoTest {
|
|||
|
||||
@Test
|
||||
public void getEmailsTest() throws IOException {
|
||||
// NOTE: The User-ID Format for the ID "Alice Anderson <alice@email.tld> [Primary Mail Address]" is incorrect.
|
||||
// TODO: Fix?
|
||||
String KEY = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" +
|
||||
"Version: PGPainless\n" +
|
||||
"Comment: B4A8 9FE8 9D59 31E6 BCF7 DC2F 6BA1 2CC7 9A08 8D73\n" +
|
||||
|
|
|
@ -119,6 +119,7 @@ public class SignatureUtilsTest {
|
|||
"-----END PGP PUBLIC KEY BLOCK-----\n";
|
||||
|
||||
String aliceId = "Alice <alice@exmaple.com>";
|
||||
// TODO: Fix wrong user-id format of pet name
|
||||
String charliesPetNameForAlice = "Alice Example <alice@example.com> [from work]";
|
||||
|
||||
long aliceKeyId = 1059762964264170602L;
|
||||
|
|
Loading…
Reference in a new issue