diff options
author | Justin Clark-Casey (justincc) | 2010-08-27 23:22:49 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-08-27 23:22:49 +0100 |
commit | 86937d0a0f5572b002cdb6efc499c234b2a9bd1b (patch) | |
tree | 6791667725972cfbc4a7965326f83502c53b87bf /OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-86937d0a0f5572b002cdb6efc499c234b2a9bd1b.zip opensim-SC_OLD-86937d0a0f5572b002cdb6efc499c234b2a9bd1b.tar.gz opensim-SC_OLD-86937d0a0f5572b002cdb6efc499c234b2a9bd1b.tar.bz2 opensim-SC_OLD-86937d0a0f5572b002cdb6efc499c234b2a9bd1b.tar.xz |
allow inventory path specified in "load iar" to start with a / (e.g. /Objects is now valid where it wasn't before)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 24 |
1 files changed, 24 insertions, 0 deletions
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 | |||
343 | } | 343 | } |
344 | 344 | ||
345 | /// <summary> | 345 | /// <summary> |
346 | /// Test that things work when the load path specified starts with a slash | ||
347 | /// </summary> | ||
348 | [Test] | ||
349 | public void TestLoadIarPathStartsWithSlash() | ||
350 | { | ||
351 | TestHelper.InMethod(); | ||
352 | log4net.Config.XmlConfigurator.Configure(); | ||
353 | |||
354 | SerialiserModule serialiserModule = new SerialiserModule(); | ||
355 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(true); | ||
356 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | ||
357 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | ||
358 | |||
359 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password"); | ||
360 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/Objects", "password", m_iarStream); | ||
361 | |||
362 | InventoryItemBase foundItem1 | ||
363 | = InventoryArchiveUtils.FindItemByPath( | ||
364 | scene.InventoryService, m_ua1.PrincipalID, "/Objects/" + m_item1Name); | ||
365 | |||
366 | Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); | ||
367 | } | ||
368 | |||
369 | /// <summary> | ||
346 | /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where | 370 | /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where |
347 | /// an account exists with the creator name. | 371 | /// an account exists with the creator name. |
348 | /// </summary> | 372 | /// </summary> |