summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-10-01 13:27:32 +0200
committerCarl Hetherington <cth@carlh.net>2020-10-12 17:33:59 +0200
commit19c4d36de9297b58adf25d019bf298a5026104ee (patch)
tree14a8b79b35412d344b099bc0a31d2a1f52dc8c2d
parent0caa6358a49c66d52d2af090bd2a130203673807 (diff)
Fix tests after changes made in 4f652387cbeeda9b7b8ace71e047c450acf5c871
-rw-r--r--test/config_test.cc10
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();