[Israel.pm] problem with a test
moshegrey at ubuntu.com
Mon Dec 31 14:48:43 PST 2012
Sorry for the double post but I forgot to ask again about it.
How then do I make more then one test on the module?
I want to try more then one possible way to enter the data (writing the
whole info from the command line, writing just one or two variables and a
file input), but when I try to use it again it stays with the old data,
even if I try to use a new object (tried even to have different names for
the objects, didn't help).
What am I supposed to do?
On Tue, Jan 1, 2013 at 12:29 AM, moshe nahmias <moshegrey at ubuntu.com> wrote:
> Thanks, didn't thought of that.
> On Tue, Jan 1, 2013 at 12:24 AM, sawyer x <xsawyerx at gmail.com> wrote:
>> On Mon, Dec 31, 2012 at 9:12 PM, moshe nahmias <moshegrey at ubuntu.com>wrote:
>>> I don't understand how it helps to the testing, after all you need to
>>> give data to the input or the parser to process it, isn't it?
>>> Meaning, now to seperate them what I do is just taking the user input,
>>> put it on an array, and sending it to the parser, how is it different from
>>> using the input directly?
>> If you're reading from STDIN in your function, you will make it much
>> harder to test for, because you're forcing the test to be interactive. If
>> you separate the interactive part, you could easily test it by feeding it
>> custom input.
>> Perl mailing list
>> Perl at perl.org.il
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Perl