X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fcreate_cli_test.cc;h=3bc819604e17dd5519842ac4739b016329ce9372;hb=9f125fddff88bf62d36381f9d3f09e5240b033d5;hp=97ac25374da8a135e3e6c7f38e46c099f93749f3;hpb=809bcfd85fad2ef7d4131c054be4cccd5bcc9d05;p=dcpomatic.git diff --git a/test/create_cli_test.cc b/test/create_cli_test.cc index 97ac25374..3bc819604 100644 --- a/test/create_cli_test.cc +++ b/test/create_cli_test.cc @@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE (create_cli_test) cc = run ("dcpomatic2_create x --still-length 42"); BOOST_CHECK (!cc.error); - BOOST_CHECK_EQUAL (cc.still_length, 42); + BOOST_CHECK_EQUAL(cc.still_length.get_value_or(0), 42); cc = run ("dcpomatic2_create x --standard SMPTE"); BOOST_CHECK (!cc.error); @@ -123,7 +123,7 @@ BOOST_AUTO_TEST_CASE (create_cli_test) BOOST_CHECK (!cc.error); BOOST_REQUIRE (cc.config_dir); BOOST_CHECK_EQUAL (*cc.config_dir, "foo/bar"); - BOOST_CHECK_EQUAL (cc.still_length, 42); + BOOST_CHECK_EQUAL(cc.still_length.get_value_or(0), 42); BOOST_REQUIRE (cc.output_dir); BOOST_CHECK_EQUAL (*cc.output_dir, "flaps"); BOOST_REQUIRE_EQUAL (cc.content.size(), 3U); @@ -184,4 +184,14 @@ BOOST_AUTO_TEST_CASE (create_cli_test) BOOST_CHECK_CLOSE (*cc.content[1].gain, -6, 0.001); BOOST_CHECK_EQUAL (cc.content[2].path, "sheila.wav"); BOOST_CHECK_CLOSE (*cc.content[2].gain, 2, 0.001); + + cc = run("dcpomatic2_create --cpl 123456-789-0 dcp"); + BOOST_REQUIRE_EQUAL(cc.content.size(), 1U); + BOOST_CHECK_EQUAL(cc.content[0].path, "dcp"); + BOOST_REQUIRE(static_cast(cc.content[0].cpl)); + BOOST_CHECK_EQUAL(*cc.content[0].cpl, "123456-789-0"); + + cc = run("dcpomatic2_create -s SMPTE sheila.wav"); + BOOST_CHECK(!cc.still_length); + BOOST_CHECK(cc.error); }