ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Adamson" <>
Subject Re: ant wrapper script testing
Date Wed, 26 Oct 2016 14:16:21 GMT

I am feeling pretty good as the introduction of the newline to the printf
does not fundamentally change much about the updated processing. My main
concern was if that additional newline was going to make it into the final
arguments as extra text. This does not seem to be the case on mac or
ubuntu, so I guess sed must always eat the last newline when piped in this
I think the most important takaway from the 1.9.7 release are the quoting
of the final eval, the padding the argument before escaping to support
empty and whitespace, and the newline for the sed input on Solaris.

Not sure if attachments would go through mailing list so I'll just copy and
paste inline as they are short.

My ant file is test.xml. Used to echo's a bunch of input properties. The
trailing _ is to delimit the value to make it readable and prevent ant echo
from trimming the output:

<project default="run">
    <target name="run">
        <echo message="hello world"/>
        <echo message="foo=${foo}_"/>
        <echo message="bar=${bar}_"/>
        <echo message="nl=${nl}_"/>
        <echo message="nlnl=${nlnl}_"/>
        <echo message="nlnlnl=${nlnlnl}_"/>
        <echo message="doublespace=${doublespace}_"/>
        <echo message="end"/>

My passes a variety of characters as the properties to be echoed.
Includes literals that use an unballanced single-quote, double-quote,
backtick, dollar, backslash (trailing on value). Also properties with 1, 2,
and 3 consecutive trailing newline literals to see if they come through
accurately. The execdebug flag shows each original argument and the
quoted/escaped form of the argument used within eval.


ant >/dev/null || exit 1

# literal newline char

./dist/bin/ant --execdebug \
  "-Dfoo=dollar\$_backtick\`_single'_double\"_trailingbackslash\\" \
  "-Dbar=trailingnewline$NL" \
  "-Dnl=$NL" \
  "-Dnlnl=$NL$NL" \
  "-Dnlnlnl=$NL$NL$NL" \
  "-Ddoublespace=  " \
  "-Dx=y" \
  "-f" "test.xml"

Expected output is:

Buildfile: /home/jwa/Developer/projects/apache/ant/test.xml

     [echo] hello world
     [echo] foo=dollar$_backtick`_single'_double"_trailingbackslash\_
     [echo] bar=trailingnewline
     [echo] _
     [echo] nl=
     [echo] _
     [echo] nlnl=
     [echo] _
     [echo] nlnlnl=
     [echo] _
     [echo] doublespace=  _
     [echo] end

Jeff Adamson

Johan Corveleyn <> wrote on 10/26/2016 06:53:18 AM:

> From: Johan Corveleyn <>
> To: Ant Developers List <>
> Cc:
> Date: 10/26/2016 06:53 AM
> Subject: Re: ant wrapper script testing
> On Tue, Oct 25, 2016 at 9:29 PM, Jeff Adamson <>
> >
> > Oops, had the nawk check inverted.
> >
> > should have been
> c1ac08abcaad0030064d62933dda278b5326f92b
> >
> Great, it works on Solaris 11, both with 'sed' and 'awk' as
> esc_tool. Nice job!
> Now, I only tested 'ant -version'. I've actually not been following
> the original discussion that lead to all the changes in the wrapper
> script (I only noticed that 1.9.7 was broken on Solaris for simple
> inputs). Are there some specific inputs you would like me to test on
> Solaris? Or is there perhaps some automatic test I can run for
> exercising the various inputs to the script?
> --
> Johan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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