8000 adjust test to changed cache location · dotnet-script/dotnet-script@9dbd650 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9dbd650

Browse files
committed
adjust test to changed cache location
1 parent c1c7c8e commit 9dbd650

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Dotnet.Script.Tests/ExecutionCacheTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ public void ShouldNotUpdateHashWhenSourceIsNotChanged()
2525
WriteScript(pathToScript, "WriteLine(42);");
2626
var firstResult = Execute(pathToScript);
2727
Assert.Contains("42", firstResult.output);
28+
Assert.NotNull(firstResult.hash);
2829

2930
WriteScript(pathToScript, "WriteLine(42);");
3031
var secondResult = Execute(pathToScript);
3132
Assert.Contains("42", secondResult.output);
33+
Assert.NotNull(secondResult.hash);
3234

3335
Assert.Equal(firstResult.hash, secondResult.hash);
3436
}
@@ -45,10 +47,12 @@ public void ShouldUpdateHashWhenSourceChanges()
4547
WriteScript(pathToScript, "WriteLine(42);");
4648
var firstResult = Execute(pathToScript);
4749
Assert.Contains("42", firstResult.output);
50+
Assert.NotNull(firstResult.hash);
4851

4952
WriteScript(pathToScript, "WriteLine(84);");
5053
var secondResult = Execute(pathToScript);
5154
Assert.Contains("84", secondResult.output);
55+
Assert.NotNull(secondResult.hash);
5256

5357
Assert.NotEqual(firstResult.hash, secondResult.hash);
5458
}
@@ -103,7 +107,7 @@ public void ShouldCopyDllAndPdbToExecutionCacheFolder()
103107

104108
private static string GetPathToExecutionCache(string pathToScript)
105109
{
106-
var pathToTempFolder = Path.GetDirectoryName(Dotnet.Script.DependencyModel.ProjectSystem.FileUtils.GetPathToScriptTempFolder(pathToScript));
110+
var pathToTempFolder = Dotnet.Script.DependencyModel.ProjectSystem.FileUtils.GetPathToScriptTempFolder(pathToScript);
107111
var pathToExecutionCache = Path.Combine(pathToTempFolder, "execution-cache");
108112
return pathToExecutionCache;
109113
}

0 commit comments

Comments
 (0)
0