@@ -260,11 +260,14 @@ testTargetSelectors reportSubCase = do
260
260
" :pkg:q:lib:q:file:Q.y"
261
261
, " app/Main.hs" , " p:app/Main.hs" , " exe:ppexe:app/Main.hs" , " p:ppexe:app/Main.hs" ,
262
262
" :pkg:p:exe:ppexe:file:app/Main.hs"
263
+ , " a p p/Main.hs" , " p:a p p/Main.hs" , " exe:pppexe:a p p/Main.hs" , " p:pppexe:a p p/Main.hs" ,
264
+ " :pkg:p:exe:pppexe:file:a p p/Main.hs"
263
265
]
264
266
ts @?= replicate 5 (TargetComponent " p-0.1" (CLibName LMainLibName ) (FileTarget " P" ))
265
267
++ replicate 5 (TargetComponent " q-0.1" (CLibName LMainLibName ) (FileTarget " QQ" ))
266
268
++ replicate 5 (TargetComponent " q-0.1" (CLibName LMainLibName ) (FileTarget " Q" ))
267
269
++ replicate 5 (TargetComponent " p-0.1" (CExeName " ppexe" ) (FileTarget (" app" </> " Main.hs" )))
270
+ ++ replicate 5 (TargetComponent " p-0.1" (CExeName " pppexe" ) (FileTarget (" a p p" </> " Main.hs" )))
268
271
-- Note there's a bit of an inconsistency here: for the single-part
269
272
-- syntax the target has to point to a file that exists, whereas for
270
273
-- all the other forms we don't require that.
@@ -278,9 +281,8 @@ testTargetSelectors reportSubCase = do
278
281
testTargetSelectorBadSyntax :: Assertion
279
282
testTargetSelectorBadSyntax = do
280
283
(_, _, _, localPackages, _) <- configureProject testdir config
281
- let targets = [ " foo bar" , " foo"
282
- , " foo:" , " foo::bar"
283
- , " foo: " , " foo: :bar"
284
+ let targets = [ " foo:" , " foo::bar"
285
+ , " :foo" , " foo: :bar"
284
286
, " a:b:c:d:e:f" , " a:b:c:d:e:f:g:h" ]
285
287
Left errs <- readTargetSelectors localPackages Nothing targets
286
288
zipWithM_ (@?=) errs (map TargetSelectorUnrecognised targets)
0 commit comments