Question

I'm trying to pass some parameters to a test script through the prove command. Based on some old threads where is option was hashed out, and the content's of my prove's man page (quoted below), using :: before the options should work, but prove is still parsing the test script's option as it's own:

$ prove -v t/040-unit-object-test.t :: --unit 270149 Unknown option: unit

Here the relevant part of the man page:

   Arguments to Tests

  It is possible to supply arguments to tests. To do so separate them
  from prove's own arguments with the arisdottle, '::'. For example

   prove -v t/mytest.t :: --url http://example.com

  would run t/mytest.t with the options '--url http://example.com'.  When
  running multiple tests they will each receive the same arguments.

I tried using sudo to run the option as root, but got the same error.

I am using the Getopt::Long module to get the options, and the options work when I run the test script using plain old perl, but then my SKIP and TODO blocks don't work.

I would rather not have to use the --exec workaround.

I'm running Perl 5.10 on Mac OS 10.6.

The output of prove -V is:

prove v2.64, using Test::Harness v3.25 and Perl v5.10.0

Was it helpful?

Solution

Well, you must have two versions of prove in your $PATH, an old one from 2006 from before App::Prove existed

I suggest you delete that one, and re-install App::Prove

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top