@@ -212,9 +212,9 @@ fn multiple_sdk_versions() -> anyhow::Result<()> {
212212 Ok ( ( ) )
213213}
214214
215- /// Test that `additional_dependencies` are installed correctly .
215+ /// Test installing a specific version of a dotnet tool .
216216#[ test]
217- fn additional_dependencies ( ) {
217+ fn additional_dependencies_with_version ( ) {
218218 if !EnvVars :: is_set ( EnvVars :: CI ) {
219219 return ;
220220 }
@@ -230,7 +230,7 @@ fn additional_dependencies() {
230230 name: local
231231 language: dotnet
232232 entry: dotnet-outdated --version
233- additional_dependencies: ["dotnet-outdated-tool"]
233+ additional_dependencies: ["dotnet-outdated-tool:4.7.1 "]
234234 always_run: true
235235 verbose: true
236236 pass_filenames: false
@@ -273,52 +273,6 @@ fn additional_dependencies() {
273273 " ) ;
274274}
275275
276- /// Test installing a specific version of a dotnet tool.
277- #[ test]
278- fn additional_dependencies_with_version ( ) {
279- if !EnvVars :: is_set ( EnvVars :: CI ) {
280- return ;
281- }
282-
283- let context = TestContext :: new ( ) ;
284- context. init_project ( ) ;
285-
286- context. write_pre_commit_config ( indoc:: indoc! { r#"
287- repos:
288- - repo: local
289- hooks:
290- - id: local
291- name: local
292- language: dotnet
293- entry: dotnet-outdated --version
294- additional_dependencies: ["dotnet-outdated-tool:4.7.1"]
295- always_run: true
296- verbose: true
297- pass_filenames: false
298- "# } ) ;
299- context. git_add ( "." ) ;
300-
301- let filters: Vec < _ > = context
302- . filters ( )
303- . into_iter ( )
304- . chain ( [ ( r"\b(4\.7\.1\+)[0-9a-f]+\b" , "${1}[SHA]" ) ] )
305- . collect ( ) ;
306-
307- cmd_snapshot ! ( filters, context. run( ) , @"
308- success: true
309- exit_code: 0
310- ----- stdout -----
311- local....................................................................Passed
312- - hook id: local
313- - duration: [TIME]
314-
315- A .NET Core global tool to list outdated Nuget packages.
316- 4.7.1+[SHA]
317-
318- ----- stderr -----
319- " ) ;
320- }
321-
322276/// Test that additional dependencies in a remote repo are installed correctly.
323277#[ test]
324278fn additional_dependencies_in_remote_repo ( ) -> anyhow:: Result < ( ) > {
0 commit comments