<?xml version="1.0" ?>

<project name="tests.tokensource" basedir="." default="main">

    <target name="main" >
        <echo msg="Testing" />

        <!-- Test calling ReplaceTokens normally -->
        <copy todir=".">
            <fileset dir=".">
                <include name="test.txt" />
            </fileset>
            
            <mapper type="glob" from="*.txt" to="*.new1.txt" />

            <filterchain>
                <replacetokens>
                    <tokensource classname="phing.filters.util.IniFileTokenReader">
                        <param name="file" value="tokens.ini" />
                    </tokensource>
                </replacetokens>
            </filterchain>
        </copy>
        <!-- Test calling ReplaceTokens with FilterReader -->
        <copy todir=".">
            <fileset dir=".">
                <include name="test.txt" />
            </fileset>
            
            <mapper type="glob" from="*.txt" to="*.new2.txt" />

            <filterchain>
                <filterreader classname="phing.filters.ReplaceTokens">
                    <param type="tokensource">
                        <!-- Used by TokenSource -->
                        <param name="classname" value="phing.filters.util.IniFileTokenReader" />
                        <!-- Given to the TokenReader -->
                        <param name="file" value="tokens.ini" />
                    </param>
                </filterreader>
            </filterchain>

        </copy>
    </target>
</project>
