mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 10:49:39 +02:00
GenerateKeyTest: test user-id with whitespace
This commit is contained in:
parent
e4cf656af9
commit
bd991d0a78
1 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,7 @@ import java.io.IOException;
|
||||||
import org.bouncycastle.openpgp.PGPException;
|
import org.bouncycastle.openpgp.PGPException;
|
||||||
import org.bouncycastle.openpgp.PGPSecretKey;
|
import org.bouncycastle.openpgp.PGPSecretKey;
|
||||||
import org.bouncycastle.openpgp.PGPSecretKeyRing;
|
import org.bouncycastle.openpgp.PGPSecretKeyRing;
|
||||||
|
import org.bouncycastle.openpgp.api.OpenPGPKey;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.pgpainless.PGPainless;
|
import org.pgpainless.PGPainless;
|
||||||
|
@ -108,6 +109,7 @@ public class GenerateKeyTest {
|
||||||
.generate()
|
.generate()
|
||||||
.getBytes();
|
.getBytes();
|
||||||
|
|
||||||
assertTrue(new String(keyBytes).contains("Foo\\n\\nBar"));
|
OpenPGPKey key = PGPainless.getInstance().readKey().parseKey(keyBytes);
|
||||||
|
assertTrue(key.getValidUserIds().get(0).getUserId().equals("Foo\n\nBar"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue