Fwd: The --test-option flag and TEMPLATE arguments

Probably of interest to other denizens of cabal-devel...
---------- Forwarded message ----------
From: Johan Tibell

Hi all, I had a look at actually implementing the feature this morning but got stuck on the flag parsing. How do I convert , option [] ["test-option"] ("give extra option to test executables " ++ "(no need to quote options containing spaces)") testOptions (\v flags -> flags { testOptions = v }) (reqArg' "OPT" (\x -> toFlag [x]) (fromFlagOrDefault [])) from Simple/Setup.hs to something that eventually ends up as a [PathTemplate] instead of [String]? Feels like it should be simple but GetOpt defeats me again. Johan

On Tue, Jan 11, 2011 at 7:44 AM, Johan Tibell
Hi all,
I had a look at actually implementing the feature this morning but got stuck on the flag parsing. How do I convert
, option [] ["test-option"] ("give extra option to test executables " ++ "(no need to quote options containing spaces)") testOptions (\v flags -> flags { testOptions = v }) (reqArg' "OPT" (\x -> toFlag [x]) (fromFlagOrDefault []))
from Simple/Setup.hs to something that eventually ends up as a [PathTemplate] instead of [String]? Feels like it should be simple but GetOpt defeats me again.
I worked it out, now I just need to figure out why --test-option='--jxml=dist/test/$test-suite.xml' doesn't work.
participants (2)
-
Duncan Coutts
-
Johan Tibell