Skip to content

Commit 9d9bbcc

Browse files
Add test that AppContext.BaseDirectory is rooted (#113232)
1 parent 1c9d5e3 commit 9d9bbcc

File tree

1 file changed

+7
-0
lines changed
  • src/libraries/System.Runtime/tests/System.Runtime.Tests/System/AppContext

1 file changed

+7
-0
lines changed

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/AppContext/AppContextTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.IO;
45
using Xunit;
56

67
namespace System.Tests
@@ -28,5 +29,11 @@ public void AppContext_ThrowTest()
2829
{
2930
AssertExtensions.Throws<ArgumentNullException>("name", () => AppContext.SetData(null, 123));
3031
}
32+
33+
[Fact]
34+
public void BaseDirectory_PathRooted()
35+
{
36+
Assert.True(Path.IsPathRooted(AppContext.BaseDirectory), "BaseDirectory should be a rooted path");
37+
}
3138
}
3239
}

0 commit comments

Comments
 (0)