File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 88# include " account_manager.hh"
99# include " utils/address.hh"
1010# include " utils/ustring_utils.hh"
11+ # include < boost/property_tree/ptree.hpp>
1112
1213BOOST_AUTO_TEST_SUITE (Composing)
1314
@@ -150,5 +151,37 @@ BOOST_AUTO_TEST_SUITE(Composing)
150151 teardown ();
151152 }
152153
154+ BOOST_AUTO_TEST_CASE (compose_test_body_preferred_html)
155+ {
156+ using Astroid::ComposeMessage;
157+ using Astroid::Message;
158+ using boost::property_tree::ptree;
159+
160+ setup ();
161+ const_cast <ptree&>(astroid->config ()).put (" thread_view.preferred_type" , " html" );
162+
163+ ComposeMessage * c = new ComposeMessage ();
164+
165+ ustring bdy = " This is test: æøå.\n > testing\n testing\n ..." ;
166+
167+ LOG (trace) << " cm: writing utf-8 text to message body: " << bdy;
168+ c->body << bdy;
169+
170+ c->build ();
171+ c->finalize ();
172+ ustring fn = c->write_tmp ();
173+
174+ delete c;
175+
176+ Message m (fn);
177+
178+ ustring rbdy = m.viewable_text (false );
179+
180+ BOOST_CHECK_MESSAGE (bdy == rbdy, " message reading produces the same output as compose message input" );
181+
182+ unlink (fn.c_str ());
183+ teardown ();
184+ }
185+
153186BOOST_AUTO_TEST_SUITE_END ()
154187
You can’t perform that action at this time.
0 commit comments