mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-17 16:09:29 +00:00
2bbdc38b51
* KNI projects * update actions fixes MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file. * remove test for issue #633 * build tests * KNI TypeReaders * KNI/XNA compatible code * GetRuntimeReader from runtime types * remove MockGameWindow
27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using MonoGame.Extended.Collections;
|
|
using MonoGame.Extended.Content;
|
|
using Xunit;
|
|
|
|
namespace MonoGame.Extended.Tests.Content
|
|
{
|
|
public class ContentReaderExtensionsTests
|
|
{
|
|
[Theory]
|
|
[InlineData("testsuperdir/testsubdir1/testsubdir2/resource", "testsuperdir/testsubdir1/testsubdir2/resource")]
|
|
[InlineData("testsuperdir/testsubdir1/../testsubdir2/resource", "testsuperdir/testsubdir2/resource")]
|
|
[InlineData("testsuperdir/../resource", "resource")]
|
|
[InlineData("../testsuperdir/testsubdir1/../testsubdir2/resource", "../testsuperdir/testsubdir2/resource")]
|
|
[InlineData("testsuperdir/testsubdir1/testsubdir2/../../testsubdir3/resource", "testsuperdir/testsubdir3/resource")]
|
|
[InlineData("testsuperdir/testsubdir1/../testsubdir2/../testsubdir3/resource", "testsuperdir/testsubdir3/resource")]
|
|
public void ContentReaderExtensions_ShortenRelativePath(string input, string expectedoutput)
|
|
{
|
|
Assert.True(ContentReaderExtensions.ShortenRelativePath(input) == expectedoutput);
|
|
}
|
|
|
|
}
|
|
}
|