Browse Source

Ensure the line-ends match the platforms expectation in UTF-16 case. I can't seem to find a way that svn will accept UTF-16 and native eol-style, so I fall back to the trusted fixcrlf.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@633469 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 17 years ago
parent
commit
96582825bb
2 changed files with 13 additions and 1 deletions
  1. +13
    -1
      src/tests/antunit/types/resources/concat-resource-test.xml
  2. +0
    -0
      src/tests/antunit/types/resources/utf-16.in

+ 13
- 1
src/tests/antunit/types/resources/concat-resource-test.xml View File

@@ -8,6 +8,12 @@
<property name="br" value="${line.separator}" /> <property name="br" value="${line.separator}" />
<property name="world" value="World" /> <property name="world" value="World" />


<property name="out.dir" location="tempdir"/>

<target name="tearDown">
<delete dir="${out.dir}" quiet="true"/>
</target>

<target name="testCountEquals1"> <target name="testCountEquals1">
<au:assertTrue> <au:assertTrue>
<resourcecount count="1"> <resourcecount count="1">
@@ -52,9 +58,15 @@
</target> </target>


<target name="testEncoding"> <target name="testEncoding">
<mkdir dir="${out.dir}"/>
<copy file="utf-16.in" toDir="${out.dir}" encoding="utf-16">
<filterchain>
<fixcrlf/>
</filterchain>
</copy>
<au:assertTrue> <au:assertTrue>
<resourcesmatch astext="true"> <resourcesmatch astext="true">
<file file="utf-16.in" />
<file file="${out.dir}/utf-16.in" />
<concat outputEncoding="utf-16">foo${br}bar${br}baz${br}</concat> <concat outputEncoding="utf-16">foo${br}bar${br}baz${br}</concat>
<concat outputEncoding="utf-16" fixlastline="true"> <concat outputEncoding="utf-16" fixlastline="true">
<string value="foo" /> <string value="foo" />


+ 0
- 0
src/tests/antunit/types/resources/utf-16.in View File


Loading…
Cancel
Save