Skip to content

Commit c31a9c4

Browse files
author
Matt Bernier
authored
Merge pull request #53 from adlan/fix-license-path-check
Make sure LICENSE file test works cross-platform
2 parents 0c9bdde + 0d1169d commit c31a9c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

UnitTest/UnitTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public class TestRepositoryFiles
104104
[Test]
105105
public void TestLicenseEndYear()
106106
{
107-
string line = File.ReadLines(@"..\..\..\LICENSE.txt").Skip(2).Take(1).First();
107+
var licensePath = Path.Combine("..", "..", "..", "LICENSE.txt");
108+
string line = File.ReadLines(licensePath).Skip(2).Take(1).First();
108109

109110
Assert.AreEqual(DateTime.Now.Year.ToString(), line.Substring(19, 4));
110111
}

0 commit comments

Comments
 (0)