From 86937d0a0f5572b002cdb6efc499c234b2a9bd1b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 27 Aug 2010 23:22:49 +0100
Subject: allow inventory path specified in "load iar" to start with a / (e.g.
/Objects is now valid where it wasn't before)
---
.../Archiver/Tests/InventoryArchiverTests.cs | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
(limited to 'OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 892680e..e8a26b5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -343,6 +343,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
}
///
+ /// Test that things work when the load path specified starts with a slash
+ ///
+ [Test]
+ public void TestLoadIarPathStartsWithSlash()
+ {
+ TestHelper.InMethod();
+ log4net.Config.XmlConfigurator.Configure();
+
+ SerialiserModule serialiserModule = new SerialiserModule();
+ InventoryArchiverModule archiverModule = new InventoryArchiverModule(true);
+ Scene scene = SceneSetupHelpers.SetupScene("inventory");
+ SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
+
+ UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password");
+ archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/Objects", "password", m_iarStream);
+
+ InventoryItemBase foundItem1
+ = InventoryArchiveUtils.FindItemByPath(
+ scene.InventoryService, m_ua1.PrincipalID, "/Objects/" + m_item1Name);
+
+ Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()");
+ }
+
+ ///
/// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where
/// an account exists with the creator name.
///
--
cgit v1.1