@@ -25,10 +25,12 @@ public void ShouldNotUpdateHashWhenSourceIsNotChanged()
25
25
WriteScript ( pathToScript , "WriteLine(42);" ) ;
26
26
var firstResult = Execute ( pathToScript ) ;
27
27
Assert . Contains ( "42" , firstResult . output ) ;
28
+ Assert . NotNull ( firstResult . hash ) ;
28
29
29
30
WriteScript ( pathToScript , "WriteLine(42);" ) ;
30
31
var secondResult = Execute ( pathToScript ) ;
31
32
Assert . Contains ( "42" , secondResult . output ) ;
33
+ Assert . NotNull ( secondResult . hash ) ;
32
34
33
35
Assert . Equal ( firstResult . hash , secondResult . hash ) ;
34
36
}
@@ -45,10 +47,12 @@ public void ShouldUpdateHashWhenSourceChanges()
45
47
WriteScript ( pathToScript , "WriteLine(42);" ) ;
46
48
var firstResult = Execute ( pathToScript ) ;
47
49
Assert . Contains ( "42" , firstResult . output ) ;
50
+ Assert . NotNull ( firstResult . hash ) ;
48
51
49
52
WriteScript ( pathToScript , "WriteLine(84);" ) ;
50
53
var secondResult = Execute ( pathToScript ) ;
51
54
Assert . Contains ( "84" , secondResult . output ) ;
55
+ Assert . NotNull ( secondResult . hash ) ;
52
56
53
57
Assert . NotEqual ( firstResult . hash , secondResult . hash ) ;
54
58
}
@@ -103,7 +107,7 @@ public void ShouldCopyDllAndPdbToExecutionCacheFolder()
103
107
104
108
private static string GetPathToExecutionCache ( string pathToScript )
105
109
{
106
- var pathToTempFolder = Path . GetDirectoryName ( Dotnet . Script . DependencyModel . ProjectSystem . FileUtils . GetPathToScriptTempFolder ( pathToScript ) ) ;
110
+ var pathToTempFolder = Dotnet . Script . DependencyModel . ProjectSystem . FileUtils . GetPathToScriptTempFolder ( pathToScript ) ;
107
111
var pathToExecutionCache = Path . Combine ( pathToTempFolder , "execution-cache" ) ;
108
112
return pathToExecutionCache ;
109
113
}
0 commit comments