I saw that it was removed.  I was just suggesting that it could be "moved"
instead of just removed.  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.

Gilles

2008/1/10, Xavier Hanin <[EMAIL PROTECTED]>:
>
> On Jan 10, 2008 8:58 AM, Gilles Scokart <[EMAIL PROTECTED]> wrote:
>
> > 2008/1/9, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > >
> > > 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

Reply via email to