diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-02 18:27:54 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-02 18:28:54 +0000 |
commit | 9e9863aa5fb74358cd2b5960e4d8d16f1ee9fece (patch) | |
tree | dc897d6ddb7541621fe168fa14726064344c947f /t/content_id.t | |
parent | af2e250ca2704d06afe0a7ed862dcfca7f740de7 (diff) | |
download | public-inbox-9e9863aa5fb74358cd2b5960e4d8d16f1ee9fece.tar.gz |
We merely use this for internal comparisons and do not store this in Xapian. So using a shorter, non-human readable digest is enough. Furthermore, introduce "content_digest" which returns the Digest::SHA object for extra changes.
Diffstat (limited to 't/content_id.t')
-rw-r--r-- | t/content_id.t | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/t/content_id.t b/t/content_id.t index c0ae6ecd..adcdb6c1 100644 --- a/t/content_id.t +++ b/t/content_id.t @@ -18,7 +18,8 @@ my $mime = Email::MIME->create( body => "hello world\n", ); -my $res = content_id($mime); -like($res, qr/\ASHA-256:[a-f0-9]{64}\z/, 'cid in format expected'); +my $orig = content_id($mime); +my $reload = content_id(Email::MIME->new($mime->as_string)); +is($orig, $reload, 'content_id matches after serialization'); done_testing(); |