Hello,

On Wed, 9 Feb 2005 09:03:33 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> >   Modified:
> > src/main/org/apache/tools/ant/taskdefs/optional Rpm.java
> >   Log:
> >   return code checking on rpm. How do we test this?
> 
> Using a mock object for rpm? Could return the value of a system parameter or
> file content or env variable ...
> 
> <rpm rpmBuildCommand="rpm-mock"/>
> 


I mocked out/overrode the Executor object for the unit test I
submitted; I don't want to know that rpmbuild actually runs, I just
want to ensure that we can execute it and deal with all the reponses. 
I thought it was excessive to submit Jmock with the patch, but there
could be milage in using a mock Executor so you can make tests with
mock objects for all the tasks that use the Executor.

> Because rpm runs only on *nix, the test doesnt have to be platform
> independant.

I'd like to be able to make RPM's from cygwin; does that count as a
*nix in that case?

Best,

Julian.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to