diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-02-24 18:02:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-24 18:02:49 +0100 |
| commit | de795b3e103309210dac9e331d45aacf0f0d884c (patch) | |
| tree | cb1679edba6f292665bfa10f673f2aed6efb4986 /test/config_test.cc | |
| parent | c003df64136806705d7662a885ada028a2ba3032 (diff) | |
Fix config.xml corruption when it contains multi-byte UTF8 characters.
Diffstat (limited to 'test/config_test.cc')
| -rw-r--r-- | test/config_test.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/config_test.cc b/test/config_test.cc index ec67a200a..4ca3ba07f 100644 --- a/test/config_test.cc +++ b/test/config_test.cc @@ -91,3 +91,16 @@ BOOST_AUTO_TEST_CASE (config_backup_test) */ setup_test_config (); } + + +BOOST_AUTO_TEST_CASE (config_write_utf8_test) +{ + boost::filesystem::remove_all ("build/test/config.xml"); + boost::filesystem::copy_file ("test/data/utf8_config.xml", "build/test/config.xml"); + Config::override_path = "build/test"; + Config::drop (); + Config::instance()->write(); + + check_file ("test/data/utf8_config.xml", "build/test/config.xml"); +} + |
