ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: svn commit: r610562 - in /ant/ivy/core/trunk: ./ src/java/org/apache/ivy/ant/ src/java/org/apache/ivy/core/ src/java/org/apache/ivy/core/retrieve/ src/java/org/apache/ivy/core/settings/ test/java/org/apache/ivy/ant/
Date Thu, 10 Jan 2008 11:42:19 GMT
On Jan 10, 2008 12:37 PM, Gilles Scokart <gscokart@gmail.com> wrote:

> I saw that it was removed.  I was just suggesting that it could be "moved"
> instead of just removed.

OK, sorry, didn't catch your idea.


> I din't find a unit test testing specifically the
> variable substitution.
>
> But it is true thet there are plenty of test making (and testing)
> indirectly
> variable substitution.
> That's right that might be enought.

Adding a specific unit test wouldn't hurt either. But the code in main was
really outdated anyway so I see no direct relationship between removing the
main method and adding a specific unit test for variable substitution.

Xavier

>
>
> Gilles
>
> 2008/1/10, Xavier Hanin <xavier.hanin@gmail.com>:
> >
> > On Jan 10, 2008 8:58 AM, Gilles Scokart <gscokart@gmail.com> wrote:
> >
> > > 2008/1/9, maartenc@apache.org <maartenc@apache.org>:
> > > >
> > > > Author: maartenc
> > > > Date: Wed Jan  9 13:02:58 2008
> > > > New Revision: 610562
> > > >
> > > > URL: http://svn.apache.org/viewvc?rev=610562&view=rev
> > > > Log:
> > > > NEW: Add support for importing environment variables (IVY-608)
> > > >
> > > > Modified:
> > > >
> ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java
> > > > URL:
> > > >
> > >
> >
> http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java?rev=610562&r1=610561&r2=610562&view=diff
> > > >
> > > >
> > >
> >
> ==============================================================================
> > > > ---
> > > ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java
> > > > (original)
> > > > +++
> > > ant/ivy/core/trunk/src/java/org/apache/ivy/core/IvyPatternHelper.java
> > > > Wed Jan  9 13:02:58 2008
> > > > @@ -361,21 +362,6 @@
> > > >          m.appendTail(sb);
> > > >
> > > >          return sb.toString();
> > > > -    }
> > > > -
> > > > -    public static void main(String[] args) {
> > > > -        String pattern =
> > > > "[organisation]/[module]/build/archives/[type]s/"
> > > > -                + "[artifact]-[revision].[ext]";
> > > > -        System.out.println("pattern= " + pattern);
> > > > -        System.out.println("resolved= "
> > > > -                + substitute(pattern, "apache", "Test", "1.0",
> > "test",
> > > > "jar", "jar"));
> > > > -
> > > > -        Map variables = new HashMap();
> > > > -        variables.put("test", "mytest");
> > > > -        variables.put("test2", "${test}2");
> > > > -        pattern = "${test} ${test2} ${nothing}";
> > > > -        System.out.println("pattern= " + pattern);
> > > > -        System.out.println("resolved= " +
> > substituteVariables(pattern,
> > > > variables));
> > > >      }
> > > >
> > > >      /**
> > > >
> > > >
> > > Shouldn't this be put in a unit test?
> >
> > Maarten has removed this, not added. It used to be here since something
> > like
> > Ivy 0.1, when I almost didn't know the benefit of unit testing :-) So I
> > guess removing that doesn't hurt at all, we already have unit tests
> > covering
> > this kind of substitution.
> >
> > Xavier
> >
> >
> > >
> > > --
> > > Gilles Scokart
> > >
> >
> >
> >
> > --
> > Xavier Hanin - Independent Java Consultant
> > http://xhab.blogspot.com/
> > http://ant.apache.org/ivy/
> > http://www.xoocode.org/
> >
>
>
>
> --
> Gilles Scokart
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message