@@ -19,6 +19,7 @@ public void Path()
19
19
Assert . NotNull ( spec ) ;
20
20
Assert . Equal ( EngineSpecType . Path , spec . Type ) ;
21
21
Assert . Equal ( Environment . CurrentDirectory , spec . Path ) ;
22
+ Assert . Equal ( Environment . CurrentDirectory , spec . ToBuildEngineSpecification ( string . Empty ) . ToReparsableString ( ) ) ;
22
23
}
23
24
24
25
[ Fact ]
@@ -34,6 +35,9 @@ public void Git()
34
35
Assert . Equal ( EngineSpecType . GitCommit , spec . Type ) ;
35
36
Assert . Equal ( "main" , spec . GitCommit ) ;
36
37
Assert . Equal ( "[email protected] :group/repository.git" , spec . GitUrl ) ;
38
+ Assert . Equal (
39
+ "git:main@[email protected] :group/repository.git" ,
40
+ spec . ToBuildEngineSpecification ( string . Empty ) . ToReparsableString ( ) ) ;
37
41
}
38
42
39
43
[ Fact ]
@@ -55,6 +59,9 @@ public void GitLegacy()
55
59
Assert . Equal ( "b" , Assert . Single ( spec . ZipLayers ) ) ;
56
60
Assert . Equal ( "c" , spec . WindowsSharedGitCachePath ) ;
57
61
Assert . Equal ( "d" , spec . MacSharedGitCachePath ) ;
62
+ Assert . Equal (
63
+ "git:main@[email protected] :group/repository.git?config=z%3ab%2cwc%3ac%2cmc%3ad" ,
64
+ spec . ToBuildEngineSpecification ( string . Empty ) . ToReparsableString ( ) ) ;
58
65
}
59
66
60
67
[ Fact ]
@@ -63,7 +70,7 @@ public void GitWithOptions()
63
70
var option = new Option < EngineSpec > ( "--engine" , parseArgument : EngineSpec . ParseEngineSpecContextless ( ) ) ;
64
71
var result = option . Parse ( [
65
72
"--engine" ,
66
- "git:main@[email protected] :group/repository.git?submodules=false&lfs=true&config=f:a,z:b,wc:c,mc:d"
73
+ "git:main@[email protected] :group/repository.git?submodules=false&lfs=true&lfsStoragePath=C%3A%5CGitLFSCache& config=f:a,z:b,wc:c,mc:d"
67
74
] ) ;
68
75
var spec = result . GetValueForOption ( option ) ;
69
76
Assert . NotNull ( spec ) ;
@@ -72,13 +79,17 @@ public void GitWithOptions()
72
79
Assert . Equal ( "[email protected] :group/repository.git" , spec . GitUrl ) ;
73
80
Assert . Equal ( "false" , spec . GitQueryString ? [ "submodules" ] ) ;
74
81
Assert . Equal ( "true" , spec . GitQueryString ? [ "lfs" ] ) ;
82
+ Assert . Equal ( @"C:\GitLFSCache" , spec . GitQueryString ? [ "lfsStoragePath" ] ) ;
75
83
Assert . Equal ( "f:a,z:b,wc:c,mc:d" , spec . GitQueryString ? [ "config" ] ) ;
76
84
Assert . NotNull ( spec . FolderLayers ) ;
77
85
Assert . Equal ( "a" , Assert . Single ( spec . FolderLayers ) ) ;
78
86
Assert . NotNull ( spec . ZipLayers ) ;
79
87
Assert . Equal ( "b" , Assert . Single ( spec . ZipLayers ) ) ;
80
88
Assert . Equal ( "c" , spec . WindowsSharedGitCachePath ) ;
81
89
Assert . Equal ( "d" , spec . MacSharedGitCachePath ) ;
90
+ Assert . Equal (
91
+ "git:main@[email protected] :group/repository.git?submodules=false&lfs=true&lfsStoragePath=C%3a%5cGitLFSCache&config=f%3aa%2cz%3ab%2cwc%3ac%2cmc%3ad" ,
92
+ spec . ToBuildEngineSpecification ( string . Empty ) . ToReparsableString ( ) ) ;
82
93
}
83
94
84
95
[ Fact ]
@@ -93,6 +104,9 @@ public void Uefs()
93
104
Assert . NotNull ( spec ) ;
94
105
Assert . Equal ( EngineSpecType . UEFSPackageTag , spec . Type ) ;
95
106
Assert . Equal ( "example.com/path:tag" , spec . UEFSPackageTag ) ;
107
+ Assert . Equal (
108
+ "uefs:example.com/path:tag" ,
109
+ spec . ToBuildEngineSpecification ( string . Empty ) . ToReparsableString ( ) ) ;
96
110
}
97
111
}
98
112
}
0 commit comments