mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
pgcrypto: Remove explicit hex encoding/decoding from tests
This was from before the hex format was available in bytea. Now we can remove the extra explicit encoding/decoding calls and rely on the default output format. Discussion: https://www.postgresql.org/message-id/flat/17dcb4f7-7ac1-e2b6-d5f7-2dfba06cd9ee%40enterprisedb.com
This commit is contained in:
@ -1,19 +1,17 @@
|
||||
--
|
||||
-- PGP Armor
|
||||
--
|
||||
-- ensure consistent test output regardless of the default bytea format
|
||||
SET bytea_output TO escape;
|
||||
|
||||
select armor('');
|
||||
select armor('test');
|
||||
select dearmor(armor(''));
|
||||
select dearmor(armor('zooka'));
|
||||
select encode(dearmor(armor('')), 'escape');
|
||||
select encode(dearmor(armor('zooka')), 'escape');
|
||||
|
||||
select armor('0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
0123456789abcdef0123456789abcdef0123456789abcdef');
|
||||
|
||||
-- lots formatting
|
||||
select dearmor(' a pgp msg:
|
||||
select encode(dearmor(' a pgp msg:
|
||||
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
Comment: Some junk
|
||||
@ -22,10 +20,10 @@ em9va2E=
|
||||
|
||||
=D5cR
|
||||
|
||||
-----END PGP MESSAGE-----');
|
||||
-----END PGP MESSAGE-----'), 'escape');
|
||||
|
||||
-- lots messages
|
||||
select dearmor('
|
||||
select encode(dearmor('
|
||||
wrong packet:
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
@ -46,7 +44,7 @@ use only first packet
|
||||
d3Jvbmc=
|
||||
=vCYP
|
||||
-----END PGP MESSAGE-----
|
||||
');
|
||||
'), 'escape');
|
||||
|
||||
-- bad crc
|
||||
select dearmor('
|
||||
|
Reference in New Issue
Block a user