Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--test-options are split wrong #8090

Open
pranaysashank opened this issue Apr 8, 2022 · 1 comment · May be fixed by #8093
Open

--test-options are split wrong #8090

pranaysashank opened this issue Apr 8, 2022 · 1 comment · May be fixed by #8093

Comments

@pranaysashank
Copy link

Describe the bug
cabal's test-options botches the arguments before it passes them to the test executable

To Reproduce
Clone cabal repo, and run the following command

cabal v2-test integration-tests2 --test-options '-p "find root"'

it should work fine, however the below command doesn't

cabal v2-test integration-tests2 --test-options "-p 'find root'"

Expected behavior
Both methods of passing the arguments should work.

System information

  • Operating system: nixos
  • cabal, ghc versions: 3.6.2.0, 8.10.7

Additional context
Did some investigation, and that the bug is in the splitArgs function

> splitArgs "-p 'find root'"
["-p","'find","root'"]
@Mikolaj
Copy link
Member

Mikolaj commented Apr 8, 2022

This is a terrible user experience, so very important IMHO.

pranaysashank added a commit to pranaysashank/cabal that referenced this issue Apr 9, 2022
@pranaysashank pranaysashank linked a pull request Apr 9, 2022 that will close this issue
4 tasks
andreabedini pushed a commit to pranaysashank/cabal that referenced this issue Apr 30, 2022
andreabedini pushed a commit to pranaysashank/cabal that referenced this issue May 6, 2022
ulysses4ever pushed a commit to ulysses4ever/cabal that referenced this issue Jun 8, 2022
andreabedini pushed a commit to pranaysashank/cabal that referenced this issue Aug 13, 2022
ulysses4ever pushed a commit to pranaysashank/cabal that referenced this issue Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants