Skip to content

Commit 949048e

Browse files
author
Benoit Hudson
committed
Seriously.
1 parent e601e59 commit 949048e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Assets/FbxExporters/Editor/UnitTests/FbxExportSettingsTest.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,12 @@ public void TestGetSetFields()
160160
var defaultRelativePath = ExportSettings.GetRelativeSavePath();
161161
Assert.AreEqual(ExportSettings.kDefaultSavePath, defaultRelativePath);
162162

163+
// the path to Assets but with platform-dependent separators
164+
var appDataPath = Application.dataPath.Replace(Path.AltDirectorySeparatorChar,
165+
Path.DirectorySeparatorChar);
166+
163167
var defaultAbsolutePath = ExportSettings.GetAbsoluteSavePath();
164-
var dataPath = Path.Combine(Application.dataPath, ExportSettings.kDefaultSavePath)
165-
.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
168+
var dataPath = Path.Combine(appDataPath, ExportSettings.kDefaultSavePath);
166169
Assert.AreEqual(dataPath, defaultAbsolutePath);
167170

168171
// set; check that the saved value is platform-independent,
@@ -173,8 +176,7 @@ public void TestGetSetFields()
173176
Assert.AreEqual("a/b/c", convertToModelSavePath);
174177
Assert.AreEqual("a/b/c", ExportSettings.GetRelativeSavePath());
175178
var platformPath = Path.Combine("a", Path.Combine("b", "c"));
176-
Assert.AreEqual(Path.Combine(Application.dataPath, platformPath),
177-
ExportSettings.GetAbsoluteSavePath());
179+
Assert.AreEqual(Path.Combine(appDataPath, platformPath), ExportSettings.GetAbsoluteSavePath());
178180
}
179181
}
180182
}

0 commit comments

Comments
 (0)