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/cinema_list_test.cc | |
| parent | 1e6484e0fe9e3fa090ef58e17433333a5378043c (diff) | |
Use ConfigRestorer to reset override_path after use.
Diffstat (limited to 'test/cinema_list_test.cc')
| -rw-r--r-- | test/cinema_list_test.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/cinema_list_test.cc b/test/cinema_list_test.cc index 4aa9fa4ed..46c9d5195 100644 --- a/test/cinema_list_test.cc +++ b/test/cinema_list_test.cc @@ -23,6 +23,7 @@ #include "lib/cinema_list.h" #include "lib/config.h" #include "lib/screen.h" +#include "test.h" #include <dcp/certificate.h> #include <dcp/filesystem.h> #include <dcp/util.h> @@ -183,11 +184,11 @@ BOOST_AUTO_TEST_CASE(add_screen_test) BOOST_AUTO_TEST_CASE(cinemas_list_copy_from_xml_test) { - Config::override_path = "build/test/cinemas_list_copy_config"; + ConfigRestorer cr("build/test/cinemas_list_copy_config"); + dcp::filesystem::remove_all(*Config::override_path); dcp::filesystem::create_directories(*Config::override_path); dcp::filesystem::copy_file("test/data/cinemas2.xml", *Config::override_path / "cinemas2.xml"); - Config::drop(); CinemaList cinema_list; cinema_list.read_legacy_file(Config::instance()->read_path("cinemas2.xml")); |
