diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-10-10 21:38:50 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-10-10 21:38:50 +0100 |
| commit | 5800b1958cfb055fe1fb30461cbf73fb50e59e12 (patch) | |
| tree | 338ed834582006126600866bfd0a775107b1f7e6 /test/tests.cc | |
| parent | ed60523d354af3b18150da1e183e80dc52ee851a (diff) | |
Sort out xmlns stuff.
Diffstat (limited to 'test/tests.cc')
| -rw-r--r-- | test/tests.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/tests.cc b/test/tests.cc index 8b32498..f0ca967 100644 --- a/test/tests.cc +++ b/test/tests.cc @@ -110,3 +110,16 @@ BOOST_AUTO_TEST_CASE (write_test) int r = system ("diff -u test/ref/b.xml build/test/b.xml"); BOOST_CHECK_EQUAL (WEXITSTATUS (r), 0); } + +BOOST_AUTO_TEST_CASE (write2_test) +{ + cxml::NodePtr document (new cxml::Node); + document->set_name ("A"); + document->add_child ("B"); + document->set_namespace_declaration ("http://my.namespace"); + document->set_namespace_declaration ("http://my.other.namespace", "foo"); + write_to_file_formatted (document, "build/test/c.xml"); + + int r = system ("diff -u test/ref/c.xml build/test/c.xml"); + BOOST_CHECK_EQUAL (WEXITSTATUS (r), 0); +} |
