File tree Expand file tree Collapse file tree
pre_commit/resources/empty_template Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " __fake_crate"
3+ version = " 0.0.0"
4+
5+ [[bin ]]
6+ name = " __fake_cmd"
7+ path = " main.rs"
Original file line number Diff line number Diff line change 1+ fn main ( ) { }
Original file line number Diff line number Diff line change @@ -604,6 +604,24 @@ def test_local_golang_additional_dependencies(store):
604604 assert _norm_out (ret [1 ]) == b"Hello, Go examples!\n "
605605
606606
607+ def test_local_rust_additional_dependencies (store ):
608+ config = {
609+ 'repo' : 'local' ,
610+ 'hooks' : [{
611+ 'id' : 'hello' ,
612+ 'name' : 'hello' ,
613+ 'entry' : 'hello' ,
614+ 'language' : 'rust' ,
615+ 'additional_dependencies' : ['cli:hello-cli:0.2.2' ],
616+ }],
617+ }
618+ repo = Repository .create (config , store )
619+ (_ , hook ), = repo .hooks
620+ ret = repo .run_hook (hook , ())
621+ assert ret [0 ] == 0
622+ assert _norm_out (ret [1 ]) == b"Hello World!\n "
623+
624+
607625def test_reinstall (tempdir_factory , store , log_info_mock ):
608626 path = make_repo (tempdir_factory , 'python_hooks_repo' )
609627 config = make_config_from_repo (path )
You can’t perform that action at this time.
0 commit comments