Hi, I've found myself passing parameters to some of my tests scripts. Usually because I want to run a specific subset of tests only.
A typical example is: $ AMS_REMOTE=1 perl -Ilib t/90up2date.t simpsons 1..26 # Testing 13 themes using the network (may take a while) ok 1 # skip Acme::MetaSyntactic::dilbert ignored upon request ok 2 # skip Acme::MetaSyntactic::dilbert ignored upon request ok 3 # skip Acme::MetaSyntactic::donmartin ignored upon request ok 4 # skip Acme::MetaSyntactic::donmartin ignored upon request ok 5 # skip Acme::MetaSyntactic::linux ignored upon request ok 6 # skip Acme::MetaSyntactic::linux ignored upon request ok 7 # skip Acme::MetaSyntactic::olympics ignored upon request ok 8 # skip Acme::MetaSyntactic::olympics ignored upon request ok 9 # skip Acme::MetaSyntactic::pause_id ignored upon request ok 10 # skip Acme::MetaSyntactic::pause_id ignored upon request ok 11 # skip Acme::MetaSyntactic::pm_groups ignored upon request ok 12 # skip Acme::MetaSyntactic::pm_groups ignored upon request ok 13 # skip Acme::MetaSyntactic::pokemon ignored upon request ok 14 # skip Acme::MetaSyntactic::pokemon ignored upon request ok 15 # skip Acme::MetaSyntactic::pornstars ignored upon request ok 16 # skip Acme::MetaSyntactic::pornstars ignored upon request ok 17 # skip Acme::MetaSyntactic::services ignored upon request ok 18 # skip Acme::MetaSyntactic::services ignored upon request ok 19 - Acme::MetaSyntactic::simpsons has 246 items ok 20 - Acme::MetaSyntactic::simpsons is up to date ok 21 # skip Acme::MetaSyntactic::tmnt ignored upon request ok 22 # skip Acme::MetaSyntactic::tmnt ignored upon request ok 23 # skip Acme::MetaSyntactic::us_presidents ignored upon request ok 24 # skip Acme::MetaSyntactic::us_presidents ignored upon request ok 25 # skip Acme::MetaSyntactic::viclones ignored upon request ok 26 # skip Acme::MetaSyntactic::viclones ignored upon request (Even though the example is for an Acme:: module, I have the intention to use this at work with a semi-intelligent wrapper around prove that I'm working on.) These parameters are obviously tightly linked to the test script itself, but I think it would be nice if prove allowed me to pass arguments to my test scripts. Naturally, it would be my responsibility, as the developer of the test script to ensure that the arguments are compatible with the test scripts run by prove. In the example above, it would be nice if I could do: $ AMS_REMOTE=1 prove t/90up2date.t -- simpsons or even better: $ AMS_REMOTE=1 prove -- simpsons The 'simpsons' parameter would be passed to every test script run by prove. How they react to it would be under each test script responsibility. I was writing a short patch for prove to extract a @t_argv array from @ARGV, when I discovered that Test::Harness::runtests doesn't expected any other arguments than file names. Would it make sense to patch Test::Harness (and Test::Harness::Strap) so that _command_line() would be able to create a command-line with parameters? Thoughts, anyone? -- Philippe "BooK" Bruhat Everyone's life seems easier from the outside. (Moral from Groo The Wanderer #45 (Epic))