+ film->set_video_frame_rate (24);
+ film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
+ auto r = make_shared<FFmpegContent>("test/data/flat_red.png");
+ film->examine_and_add_content (r);
+ auto g = make_shared<FFmpegContent>("test/data/flat_green.png");
+ film->examine_and_add_content (g);
+ auto b = make_shared<FFmpegContent>("test/data/flat_blue.png");
+ film->examine_and_add_content (b);
+ BOOST_REQUIRE (!wait_for_jobs());
+
+ r->set_position (film, dcpomatic::DCPTime::from_seconds(0));
+ r->set_video_frame_rate(film, 24);
+ r->video->set_length (24);
+ g->set_position (film, dcpomatic::DCPTime::from_seconds(1));
+ g->set_video_frame_rate(film, 24);
+ g->video->set_length (24);
+ b->set_position (film, dcpomatic::DCPTime::from_seconds(2));
+ b->set_video_frame_rate(film, 24);
+ b->video->set_length (24);
+
+ film->set_reel_type (ReelType::BY_VIDEO_CONTENT);
+ film->write_metadata ();
+ make_and_verify_dcp (
+ film,
+ {
+ dcp::VerificationNote::Code::MISSING_FFMC_IN_FEATURE,
+ dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE
+ });
+
+ int got[3] = { 0, 0, 0 };
+ for (auto i: boost::filesystem::directory_iterator(film->file(film->dcp_name()))) {
+ if (boost::regex_match(i.path().string(), boost::regex(mxf_regex("red")))) {
+ ++got[0];
+ } else if (boost::regex_match(i.path().string(), boost::regex(mxf_regex("green")))) {
+ ++got[1];
+ } else if (boost::regex_match(i.path().string(), boost::regex(mxf_regex("blue")))) {
+ ++got[2];
+ }
+ }
+
+ for (int i = 0; i < 3; ++i) {
+ BOOST_CHECK (got[i] == 2);
+ }
+}
+
+
+BOOST_AUTO_TEST_CASE (file_naming_test2)
+{
+ Keep k;
+ Config::instance()->set_dcp_asset_filename_format (dcp::NameFormat ("%c"));
+
+ auto film = new_test_film ("file_naming_test2");
+ film->set_name ("file_naming_test2");