diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-05-25 20:21:27 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-05-29 10:35:55 +0200 |
| commit | ca969a5faa17913d1da04e57f56c29d20340ce2c (patch) | |
| tree | c356eec8c72955336bedc1f52479494ead36fd65 /test/test.cc | |
| parent | 1e6484e0fe9e3fa090ef58e17433333a5378043c (diff) | |
Use ConfigRestorer to reset override_path after use.
Diffstat (limited to 'test/test.cc')
| -rw-r--r-- | test/test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test.cc b/test/test.cc index 0a59d0300..8d92b31e4 100644 --- a/test/test.cc +++ b/test/test.cc @@ -1030,8 +1030,16 @@ check_int_close (std::pair<int, int> a, std::pair<int, int> b, int d) } +ConfigRestorer::ConfigRestorer(boost::filesystem::path override_path) +{ + Config::override_path = override_path; + Config::drop(); +} + + ConfigRestorer::~ConfigRestorer() { + Config::override_path = boost::none; setup_test_config(); } @@ -1073,3 +1081,4 @@ Editor::replace(string a, string b) boost::algorithm::replace_all(_content, a, b); BOOST_REQUIRE(_content != old_content); } + |
