Browse Source

test for bug 50515

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1054685 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 15 years ago
parent
commit
8676c1c61b
1 changed files with 43 additions and 0 deletions
  1. +43
    -0
      src/tests/antunit/taskdefs/propertyfile-test.xml

+ 43
- 0
src/tests/antunit/taskdefs/propertyfile-test.xml View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
<import file="../antunit-base.xml" />
<target name="-fileResourceSetup">
<mkdir dir="${output}"/>
</target>
<target name="testInternationalText" depends="-fileResourceSetup">
<property name="line1" value="萬 利 食 品 批 發 公 司" />
<property name="line2" value="TEL: (123)123-1234" />
<propertyfile file="${output}/test.properties">
<entry key="line1" value="${line1}" />
<entry key="line2" value="${line2}" />
</propertyfile>
<loadproperties prefix="rereading" srcfile="${output}/test.properties"/>
<au:assertTrue message="${line2}">
<equals arg1="${line2}" arg2="${rereading.line2}" />
</au:assertTrue>
<au:assertTrue message="${line1}">
<equals arg1="${line1}" arg2="${rereading.line1}" />
</au:assertTrue>
</target>
</project>

Loading…
Cancel
Save