X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=test%2Fmap_cli_test.cc;h=ffe281de570ff519c342925fc237b9c28dd538bf;hp=3e6abc059cd9b93f031cce5fabdfaaddecd19200;hb=3ef1d207f33502fa5e114924f0f9abeeda97900a;hpb=575932b8dccb30a02e0cc140b52aede72828a69a diff --git a/test/map_cli_test.cc b/test/map_cli_test.cc index 3e6abc059..ffe281de5 100644 --- a/test/map_cli_test.cc +++ b/test/map_cli_test.cc @@ -353,3 +353,32 @@ BOOST_AUTO_TEST_CASE(map_two_smpte_cpls_each_with_subs) { test_two_cpls_each_with_subs("map_two_smpte_cpls_each_with_subs", false); } + + +BOOST_AUTO_TEST_CASE(map_with_given_config) +{ + string const name = "map_with_given_config"; + string const out = String::compose("build/test/%1_out", name); + + auto content = content_factory("test/data/flat_red.png"); + auto film = new_test_film2(name + "_in", content); + make_and_verify_dcp(film); + + vector const args = { + "map_cli", + "-o", out, + "-d", film->dir(film->dcp_name()).string(), + "--config", "test/data/map_with_given_config", + find_cpl(film->dir(film->dcp_name())).string() + }; + + boost::filesystem::remove_all(out); + + Config::instance()->drop(); + vector output_messages; + auto error = run(args, output_messages); + BOOST_CHECK(!error); + + /* It should be signed by the key in test/data/map_with_given_config, not the one in test/data/signer_key */ + BOOST_CHECK(dcp::file_to_string(find_file(out, "cpl_")).find("dnQualifier=\\+uOcNN2lPuxpxgd/5vNkkBER0GE=,CN=CS.dcpomatic.smpte-430-2.LEAF,OU=dcpomatic.com,O=dcpomatic.com") != std::string::npos); +}