On 2010.04.16 09:15, Philip Potter wrote:
> On 16 April 2010 13:20, Steve Bertrand <st...@ibctech.ca> wrote:
>> I use prove often, usually when I want to quickly and non-verbosely (-Q)
>> work with a single test file that I'm currently adding new tests to, or
>> to ensure existing tests still pass if making changes to a function.
>>
>> What I want to be able to do, essentially, is allow Perl code to run
>> within small sections of tests while under "make test". In essence, some
>> pseudo code that I'd put into 999-update.t:
>>
>> #test55
>> perl on
>> print result to STDOUT
>> perl off # back to no printing
> 
> Tests already *are* perl code, from start to finish. 'print'
> statements work fine in tests under prove -v. 

Yes, I understand that.

> What are you *actually*
> trying to do? What are you testing and why does this test require you
> to print output to the user under "make test"?

This particular test:

- checks to see if an existing installation of the project exists
- if yes, it reads both the currently installed config file, and the
default config file in the source tree
- it compares version numbers
- it collects all sections and directives from both files
- if versions differ, it informs the user that this is an upgrade
- if directives have changed, it informs the user which ones have been
added, and which ones have been removed

I don't want to merge the configuration files, I just want the user to
be informed of what exactly they need to change.

'make test' does not provide the ability to print out individual
statements like prove does (from what I can tell). As I said, I think my
approach is wrong, and I need to move this code out of the test.

Steve

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to