test: revert changes - follow RFC 1123

This commit is contained in:
martgil 2025-06-12 11:03:36 +08:00
parent 95860a77e3
commit 5afbf72c30

View File

@ -2399,13 +2399,13 @@ function versionSpecificTests() {
}); });
it('Generate key - single userID (special email format)', async function() { it('Generate key - single userID (special email format)', async function() {
const userID = { name: 'test', email: 'test1@example.com', comment: '' }; const userID = { name: 'test', email: 'test1@com.com09', comment: '' };
const opt = { userIDs: userID }; const opt = { userIDs: userID };
const { privateKey: armoredKey } = await openpgp.generateKey(opt); const { privateKey: armoredKey } = await openpgp.generateKey(opt);
// test also serialisation and parsing // test also serialisation and parsing
const key = await openpgp.readKey({ armoredKey }); const key = await openpgp.readKey({ armoredKey });
expect(key.users.length).to.equal(1); expect(key.users.length).to.equal(1);
expect(key.users[0].userID.userID).to.equal('test <test1@example.com>'); expect(key.users[0].userID.userID).to.equal('test <test1@com.com09>');
expect(key.users[0].userID.name).to.equal(userID.name); expect(key.users[0].userID.name).to.equal(userID.name);
expect(key.users[0].userID.email).to.equal(userID.email); expect(key.users[0].userID.email).to.equal(userID.email);
expect(key.users[0].userID.comment).to.equal(userID.comment); expect(key.users[0].userID.comment).to.equal(userID.comment);