diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-15 22:56:38 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-17 20:13:23 +0100 |
| commit | 2fecea3b47ab64a8b8580b9d186d05c18ae0e29c (patch) | |
| tree | acf1969ba8f7c6be14e09aafa0801f00bc395bc7 /test | |
| parent | 9a6cf0df676175022f7d0cade7919153207b7910 (diff) | |
Bv2.1 8.4 We must have <Hash>es
Diffstat (limited to 'test')
| -rw-r--r-- | test/verify_test.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc index 31647933..0b7faad5 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -1902,3 +1902,28 @@ BOOST_AUTO_TEST_CASE (verify_text_entry_point) } ); } + + +BOOST_AUTO_TEST_CASE (verify_assets_must_have_hashes) +{ + RNGFixer fix; + + boost::filesystem::path const dir("build/test/verify_assets_must_have_hashes"); + auto dcp = make_simple (dir); + dcp->write_xml (dcp::SMPTE); + BOOST_REQUIRE_EQUAL (dcp->cpls().size(), 1U); + + { + BOOST_REQUIRE (dcp->cpls()[0]->file()); + Editor e(dcp->cpls()[0]->file().get()); + e.replace("<Hash>cb1OLhgHG9svy7G8hoTSPpltzhw=</Hash>", ""); + } + + check_verify_result ( + {dir}, + { + { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT }, + { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_HASH } + }); +} + |
