Fix tests. v2.15.163
authorCarl Hetherington <cth@carlh.net>
Mon, 27 Sep 2021 21:58:27 +0000 (23:58 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 27 Sep 2021 21:58:27 +0000 (23:58 +0200)
test/config_test.cc
test/data

index 173c95cbf9c4fe1cc778b221cead0b8b6f6a4798..2fd6fe4aa8b6e1917fb395d3ee7a997b4cc3fb0b 100644 (file)
@@ -124,12 +124,17 @@ BOOST_AUTO_TEST_CASE (config_upgrade_test)
        boost::filesystem::copy_file ("test/data/2.14.config.xml", dir / "config.xml");
        boost::filesystem::copy_file ("test/data/2.14.cinemas.xml", dir / "cinemas.xml");
        Config::instance();
-       Config::instance()->write();
+       try {
+               /* This will fail to write cinemas.xml since the link is to a non-existant directory */
+               Config::instance()->write();
+       } catch (...) {}
 
        check_xml (dir / "config.xml", "test/data/2.14.config.xml", {});
        check_xml (dir / "cinemas.xml", "test/data/2.14.cinemas.xml", {});
        check_xml (dir / "2.16" / "config.xml", "test/data/2.16.config.xml", {});
        /* cinemas.xml is not copied into 2.16 as its format has not changed */
        BOOST_REQUIRE (!boost::filesystem::exists(dir / "2.16" / "cinemas.xml"));
+
+       setup_test_config();
 }
 
index 56b37afdf96ecc83752ce70af061ee6c7ed4f78b..246bb9adf94bc72bfe52394eacc88d6419605acb 160000 (submodule)
--- a/test/data
+++ b/test/data
@@ -1 +1 @@
-Subproject commit 56b37afdf96ecc83752ce70af061ee6c7ed4f78b
+Subproject commit 246bb9adf94bc72bfe52394eacc88d6419605acb