@@ -27,8 +27,8 @@ def test_multi_targets(self):
2727 # Random module in src/, defaults to --lib.
2828 ('src/lmod1.rs' , [('src/lib.rs' , '--lib' )]),
2929 # Target failure. Perhaps this should run rustc directly?
30- ('mystery.rs' , []),
31- ('build.rs' , []),
30+ ('mystery.rs' , [( None , '' ) ]),
31+ ('build.rs' , [( None , '' ) ]),
3232 # Shared module in test, not possible to easily determine which
3333 # test it belongs to.
3434 ('tests/common/helpers.rs' , [('tests/test1.rs' , '--test test1' ),
@@ -53,11 +53,17 @@ def test_multi_targets(self):
5353
5454 for (path , targets ) in expected_targets :
5555 path = os .path .join ('tests' , 'multi-targets' , path )
56- targets = [(os .path .normpath (
57- os .path .join (plugin_path , 'tests' , 'multi-targets' , x [0 ])),
58- x [1 ].split ()) for x in targets ]
56+ joined_targets = []
57+ for (target_path , args ) in targets :
58+ args = args .split ()
59+ if target_path :
60+ joined = os .path .normpath (
61+ os .path .join (plugin_path , 'tests' , 'multi-targets' , target_path ))
62+ joined_targets .append ((joined , args ))
63+ else :
64+ joined_targets .append ((None , args ))
5965 self ._with_open_file (path ,
60- lambda view : self ._test_multi_targets (view , targets ))
66+ lambda view : self ._test_multi_targets (view , joined_targets ))
6167
6268 def _test_multi_targets (self , view , expected_targets ):
6369 expected_targets .sort ()
0 commit comments