You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dhall has a tasty test-suite which I would like to execute with the arguments -p /type-inference\/failure/.
The arguments that cabal ends up passing to the tasty executable are -p ''\''/type-inference\/failure/'\''':
$ cabal test dhall:tasty --test-options "-p '/type-inference\/failure/'" -v
...
Test suite tasty: RUNNING...
/home/simon/src/dhall-haskell/dist-newstyle/build/x86_64-linux/ghc-8.6.5/dhall-1.26.0/t/tasty/noopt/build/tasty/tasty -p ''\''/type-inference\/failure/'\'''
option -p: Could not parse pattern
Normally '' would be interpreted and stripped by the shell. It looks like cabal is not doing that (i.e. it tries to pass the single quotes verbatim to the test suite). That's not necessarily a bug, though it would be nice if the precise semantics of --test-options was documented somewhere (is it?).
In this particular case I think you can simply drop the single quotes, as the outer double quotes would prevent the shell from interpreting the \/, but if the agument contained a white space, I wouldn't know how to pass it.
Activity
UnkindPartition commentedon Sep 19, 2019
Normally
''would be interpreted and stripped by the shell. It looks like cabal is not doing that (i.e. it tries to pass the single quotes verbatim to the test suite). That's not necessarily a bug, though it would be nice if the precise semantics of--test-optionswas documented somewhere (is it?).In this particular case I think you can simply drop the single quotes, as the outer double quotes would prevent the shell from interpreting the
\/, but if the agument contained a white space, I wouldn't know how to pass it.sjakobi commentedon Sep 19, 2019
Yes!
--test-options "-p /type-inference\/failure/"works. How had I not tried this before?!ulysses4ever commentedon Jun 10, 2022
I wonder if #8093 improved/resolves this.
Mikolaj commentedon Jun 11, 2022
Or breaks. Let's add the example above as a test for #8093.