diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-02-16 21:56:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-16 21:56:22 +0100 |
| commit | 89fbc8d186378cd72ab3e9a259073d45b7b993ad (patch) | |
| tree | 57d7cf19ca2f21f1acb9da4e7d7e9888cdab2163 /test/verify_test.cc | |
| parent | 8b86c990e526e55e273cc408377f13e64a27fb26 (diff) | |
Change how whitespace in subtitles is handled.
Previously we would discard any whitespace subtitle content we found.
This had the side-effect of making a verification test fail (checking
that at least one subtitle is in each reel; blank subtitles are often
used to avoid this warning).
Here we take any subtitle content, whitespace or not, inside a
<Text> or <Image> node which I think is a little more correct.
Diffstat (limited to 'test/verify_test.cc')
| -rw-r--r-- | test/verify_test.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc index cde49830..396a1ef5 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -825,6 +825,24 @@ BOOST_AUTO_TEST_CASE(verify_interop_subtitle_asset_with_no_subtitles) } +BOOST_AUTO_TEST_CASE(verify_interop_subtitle_asset_with_single_space_subtitle) +{ + path const dir("build/test/verify_interop_subtitle_asset_with_single_space_subtitle"); + prepare_directory(dir); + copy_file("test/data/subs5.xml", dir / "subs.xml"); + auto asset = make_shared<dcp::InteropSubtitleAsset>(dir / "subs.xml"); + auto reel_asset = make_shared<dcp::ReelInteropSubtitleAsset>(asset, dcp::Fraction(24, 1), 16 * 24, 0); + write_dcp_with_single_asset(dir, reel_asset, dcp::Standard::INTEROP); + + check_verify_result ( + { dir }, + { + { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, + }); + +} + + BOOST_AUTO_TEST_CASE (verify_valid_smpte_subtitles) { path const dir("build/test/verify_valid_smpte_subtitles"); |
