summaryrefslogtreecommitdiff
path: root/src/SMAPI.Tests/Utilities
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-12 21:26:10 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-11-28 00:01:42 -0500
commit8321cbf6eba7ca3fa46d6e452fd9ebff6baa99d0 (patch)
treea3040c8e84314514322bcf39f9bd277b14923c9b /src/SMAPI.Tests/Utilities
parent727d75ae728ba6cc8fc070524264c454aac8404f (diff)
downloadSMAPI-8321cbf6eba7ca3fa46d6e452fd9ebff6baa99d0.tar.gz
SMAPI-8321cbf6eba7ca3fa46d6e452fd9ebff6baa99d0.tar.bz2
SMAPI-8321cbf6eba7ca3fa46d6e452fd9ebff6baa99d0.zip
update for asset name format change
MonoGame uses Linux-style paths for assets on all platforms, which breaks the previous equivalence between path and asset name formats.
Diffstat (limited to 'src/SMAPI.Tests/Utilities')
-rw-r--r--src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs b/src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs
index c18f47a5..ab4c2618 100644
--- a/src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs
+++ b/src/SMAPI.Tests/Utilities/PathUtilitiesTests.cs
@@ -182,18 +182,14 @@ namespace SMAPI.Tests.Utilities
[TestCaseSource(nameof(PathUtilitiesTests.SamplePaths))]
public void NormalizeAssetName(SamplePath path)
{
- if (Path.IsPathRooted(path.OriginalPath) || path.OriginalPath.StartsWith("/") || path.OriginalPath.StartsWith("\\"))
+ if (Path.IsPathRooted(path.OriginalPath) || path.OriginalPath.StartsWith('/') || path.OriginalPath.StartsWith('\\'))
Assert.Ignore("Absolute paths can't be used as asset names.");
// act
string normalized = PathUtilities.NormalizeAssetName(path.OriginalPath);
// assert
-#if SMAPI_FOR_WINDOWS
- Assert.AreEqual(path.NormalizedOnWindows, normalized);
-#else
- Assert.AreEqual(path.NormalizedOnUnix, normalized);
-#endif
+ Assert.AreEqual(path.NormalizedOnUnix, normalized); // MonoGame uses the Linux format
}
/****