LibHac/tests/LibHac.Tests/Fs/IFileSystemTestBase/IFileSystemTests.OpenDirectory.cs

23 lines
568 B
C#
Raw Normal View History

using LibHac.Common;
using LibHac.Fs;
using LibHac.Fs.Fsa;
using Xunit;
2021-11-14 20:08:57 +01:00
namespace LibHac.Tests.Fs.IFileSystemTestBase;
public abstract partial class IFileSystemTests
{
2021-11-14 20:08:57 +01:00
[Fact]
public void OpenDirectory_PathIsFile_ReturnsPathNotFound()
{
2021-11-14 20:08:57 +01:00
IFileSystem fs = CreateFileSystem();
2021-11-14 20:08:57 +01:00
fs.CreateFile("/file", 0, CreateFileOptions.None);
2021-11-14 20:08:57 +01:00
using var directory = new UniqueRef<IDirectory>();
Result rc = fs.OpenDirectory(ref directory.Ref(), "/file", OpenDirectoryMode.All);
2021-11-14 20:08:57 +01:00
Assert.Result(ResultFs.PathNotFound, rc);
}
2021-11-14 20:08:57 +01:00
}