From cd4fb5e810ded6a5dfe6368d0304ec028de15c83 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Thu, 31 Mar 2016 19:22:51 +0100 Subject: [PATCH] Ghost a plugin to test ghosting support --- src/tests/base_game_test.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tests/base_game_test.h b/src/tests/base_game_test.h index d5a683c5..6d1a1afd 100644 --- a/src/tests/base_game_test.h +++ b/src/tests/base_game_test.h @@ -82,10 +82,20 @@ namespace loot { // Set initial load order and active plugins. setLoadOrder(getInitialLoadOrder()); setActivePlugins(getInitialActivePlugins()); + + // Ghost a plugin. + ASSERT_FALSE(boost::filesystem::exists(dataPath / (blankMasterDependentEsm + ".ghost"))); + ASSERT_NO_THROW(boost::filesystem::rename(dataPath / blankMasterDependentEsm, dataPath / (blankMasterDependentEsm + ".ghost"))); + ASSERT_TRUE(boost::filesystem::exists(dataPath / (blankMasterDependentEsm + ".ghost"))); } inline virtual void TearDown() { ASSERT_NO_THROW(boost::filesystem::remove(dataPath / masterFile)); + + // Unghost the ghosted plugin. + ASSERT_TRUE(boost::filesystem::exists(dataPath / (blankMasterDependentEsm + ".ghost"))); + ASSERT_NO_THROW(boost::filesystem::rename(dataPath / (blankMasterDependentEsm + ".ghost"), dataPath / blankMasterDependentEsm)); + ASSERT_FALSE(boost::filesystem::exists(dataPath / (blankMasterDependentEsm + ".ghost"))); } inline std::list getLoadOrder() {