Skip to content

--test-options are split wrong #8090

Open

Description

@pranaysashank

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'"]

Activity

  1. Mikolaj commented on Apr 8, 2022

    @Mikolaj
    Member

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

  2. added a commit that references this issue on Apr 9, 2022
    ec5e083
  3. added 2 commits that reference this issue on Apr 30, 2022
    98eb1eb
    9e3b1f0
  4. added a commit that references this issue on Jun 8, 2022
    8d30712
  5. added a commit that references this issue on Aug 13, 2022
    9554648
  6. added a commit that references this issue on Aug 17, 2022
    a358517
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions