From 5bfac9971a3b6df0f0ced83a5ddf81312365b1a7 Mon Sep 17 00:00:00 2001 From: Halgari Date: Fri, 7 Oct 2022 07:29:03 -0600 Subject: [PATCH] Add test test --- Wabbajack.Paths.Test/AbsolutePathTests.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Wabbajack.Paths.Test/AbsolutePathTests.cs b/Wabbajack.Paths.Test/AbsolutePathTests.cs index 4f66d3dc..3b34d5d0 100644 --- a/Wabbajack.Paths.Test/AbsolutePathTests.cs +++ b/Wabbajack.Paths.Test/AbsolutePathTests.cs @@ -115,4 +115,19 @@ public class AbsolutePathTests }; Assert.Equal(data3, data2); } + + [Fact] + public void CanGetThisAndAllParents() + { + var path = @"c:\foo\bar\baz.zip".ToAbsolutePath(); + var subPaths = new[] + { + @"c:\", + @"C:\foo", + @"c:\foo\Bar", + @"c:\foo\bar\baz.zip" + }.Select(f => f.ToAbsolutePath()); + + Assert.Equal(subPaths.OrderBy(f => f), path.ThisAndAllParents().OrderBy(f => f).ToArray()); + } } \ No newline at end of file