diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-10-01 13:27:32 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-10-12 17:33:59 +0200 |
| commit | 19c4d36de9297b58adf25d019bf298a5026104ee (patch) | |
| tree | 14a8b79b35412d344b099bc0a31d2a1f52dc8c2d | |
| parent | 0caa6358a49c66d52d2af090bd2a130203673807 (diff) | |
Fix tests after changes made in 4f652387cbeeda9b7b8ace71e047c450acf5c871
| -rw-r--r-- | test/config_test.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/config_test.cc b/test/config_test.cc index 7299d98d0..ec67a200a 100644 --- a/test/config_test.cc +++ b/test/config_test.cc @@ -31,6 +31,8 @@ rewrite_bad_config () boost::system::error_code ec; boost::filesystem::remove ("build/test/bad_config/config.xml", ec); + Config::override_path = "build/test/bad_config"; + boost::filesystem::create_directories ("build/test/bad_config"); ofstream f ("build/test/bad_config/config.xml"); f << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" << "<Config>\n" @@ -46,13 +48,7 @@ BOOST_AUTO_TEST_CASE (config_backup_test) Config::drop(); - boost::system::error_code ec; - boost::filesystem::remove ("build/test/bad_config/config.xml.1", ec); - boost::filesystem::remove ("build/test/bad_config/config.xml.2", ec); - boost::filesystem::remove ("build/test/bad_config/config.xml.3", ec); - boost::filesystem::remove ("build/test/bad_config/config.xml.4", ec); - boost::filesystem::remove ("build/test/bad_config/config.xml.5", ec); - boost::filesystem::remove ("build/test/bad_config/config.xml.5", ec); + boost::filesystem::remove_all ("build/test/bad_config"); rewrite_bad_config(); |
