summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-07-02 22:20:54 +0100
committerCarl Hetherington <cth@carlh.net>2016-07-02 22:20:54 +0100
commit59f07d959514b80fcce5aa99f575ef8e6fceba8b (patch)
treecb99bbe0c8fe9241c20a378085b03a6a046773ab /test
parent066e772c9ef7e6d08326a04a351514374e3d40e7 (diff)
Fix thinkos with marked_up() rendering of bold/italic/underline.
Diffstat (limited to 'test')
-rw-r--r--test/render_subtitles_test.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/render_subtitles_test.cc b/test/render_subtitles_test.cc
index c56f9dfa1..9ab4f5deb 100644
--- a/test/render_subtitles_test.cc
+++ b/test/render_subtitles_test.cc
@@ -82,3 +82,22 @@ BOOST_AUTO_TEST_CASE (render_markup_test4)
add (s, "Hello", true, true, true);
BOOST_CHECK_EQUAL (marked_up (s), "<i><b><u>Hello</u></b></i>");
}
+
+/** Test marked_up() in render_subtitles.cc */
+BOOST_AUTO_TEST_CASE (render_markup_test5)
+{
+ std::list<dcp::SubtitleString> s;
+ add (s, "Hello", false, true, false);
+ add (s, " world.", false, false, false);
+ BOOST_CHECK_EQUAL (marked_up (s), "<b>Hello</b> world.");
+}
+
+/** Test marked_up() in render_subtitles.cc */
+BOOST_AUTO_TEST_CASE (render_markup_test6)
+{
+ std::list<dcp::SubtitleString> s;
+ add (s, "Hello", true, false, false);
+ add (s, " world ", false, false, false);
+ add (s, "we are bold.", false, true, false);
+ BOOST_CHECK_EQUAL (marked_up (s), "<i>Hello</i> world <b>we are bold.</b>");
+}