summaryrefslogtreecommitdiff
path: root/test/map_cli_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-01-04 01:21:10 +0100
committerCarl Hetherington <cth@carlh.net>2024-01-04 01:21:10 +0100
commit1c1395154a67ddad9c576d613138897b39851e08 (patch)
tree7349957e8787e854ae755fc20ec79dcc2e78a532 /test/map_cli_test.cc
parent6b4da63ac591334aa83cd2539ca8a888da212406 (diff)
Allow specification of map CPLs by ID (#2702).
Diffstat (limited to 'test/map_cli_test.cc')
-rw-r--r--test/map_cli_test.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/map_cli_test.cc b/test/map_cli_test.cc
index 5505a197b..5a774b6a4 100644
--- a/test/map_cli_test.cc
+++ b/test/map_cli_test.cc
@@ -116,6 +116,38 @@ BOOST_AUTO_TEST_CASE(map_simple_dcp_copy)
}
+/** Map a single DCP into a new DCP, referring to the CPL by ID */
+BOOST_AUTO_TEST_CASE(map_simple_dcp_copy_by_id)
+{
+ string const name = "map_simple_dcp_copy_by_id";
+ 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);
+
+ dcp::CPL cpl(find_cpl(film->dir(film->dcp_name())));
+
+ vector<string> const args = {
+ "map_cli",
+ "-o", out,
+ "-d", film->dir(film->dcp_name()).string(),
+ cpl.id()
+ };
+
+ boost::filesystem::remove_all(out);
+
+ vector<string> output_messages;
+ auto error = run(args, output_messages);
+ BOOST_CHECK(!error);
+
+ verify_dcp(out, {});
+
+ BOOST_CHECK(boost::filesystem::is_regular_file(find_prefix(out, "j2c_")));
+ BOOST_CHECK(boost::filesystem::is_regular_file(find_prefix(out, "pcm_")));
+}
+
+
/** Map a single DCP into a new DCP using the symlink option */
BOOST_AUTO_TEST_CASE(map_simple_dcp_copy_with_symlinks)
{