ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r497298 - in /ant/antlibs/dotnet/trunk/src/tests/antunit: dir with spaces/ dir with spaces/compilation-test.xml dir with spaces/wsdl-test.xml src/example.vb
Date Thu, 18 Jan 2007 05:00:21 GMT
Author: bodewig
Date: Wed Jan 17 21:00:20 2007
New Revision: 497298

URL: http://svn.apache.org/viewvc?view=rev&rev=497298
Log:
Add tests for running the tasks in a directory with spaces in its name

Added:
    ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/
    ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/compilation-test.xml   (with
props)
    ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/wsdl-test.xml   (with props)
    ant/antlibs/dotnet/trunk/src/tests/antunit/src/example.vb   (with props)

Added: ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/compilation-test.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/dotnet/trunk/src/tests/antunit/dir%20with%20spaces/compilation-test.xml?view=auto&rev=497298
==============================================================================
--- ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/compilation-test.xml (added)
+++ ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/compilation-test.xml Wed Jan
17 21:00:20 2007
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<!--
+  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 name="compilation in dir with spaces" basedir="." default="echo"
+  xmlns:au="antlib:org.apache.ant.antunit"
+  xmlns:dn="antlib:org.apache.ant.dotnet">
+
+  <property name="source.dir" location="src"/>
+  <property name="dest.dir" location="dest"/>
+
+  <target name="probe_for_apps" >
+    <property environment="env"/>
+
+    <condition property="ilasm.found">
+      <or>
+        <available file="ilasm.exe" filepath="${env.Path}" />
+        <available file="ilasm.exe" filepath="${env.PATH}" />
+        <available file="ilasm"     filepath="${env.PATH}" />
+      </or>
+    </condition>
+
+    <condition property="csc.found">
+      <or>
+        <available file="csc.exe" filepath="${env.Path}" />
+        <available file="csc.exe" filepath="${env.PATH}" />
+        <available file="mcs"     filepath="${env.PATH}" />
+      </or>
+    </condition>
+
+    <condition property="vbc.found">
+      <or>
+        <available file="vbc.exe" filepath="${env.Path}" />
+        <available file="vbc.exe" filepath="${env.PATH}" />
+        <available file="vbc"     filepath="${env.PATH}" />
+      </or>
+    </condition>
+
+    <condition property="jsharp.found">
+      <or>
+        <available file="vjc.exe" filepath="${env.Path}" />
+        <available file="vjc.exe" filepath="${env.PATH}" />
+        <available file="vjc"     filepath="${env.PATH}" />
+      </or>
+    </condition>
+
+    <condition property="ildasm.found">
+      <or>
+        <available file="ildasm.exe" filepath="${env.Path}" />
+        <available file="ildasm.exe" filepath="${env.PATH}" />
+        <available file="ildasm"     filepath="${env.PATH}" />
+      </or>
+    </condition>
+
+  </target>
+
+  <target name="setUp">
+    <mkdir dir="${source.dir}"/>
+    <mkdir dir="${dest.dir}"/>
+    <copy todir="${source.dir}">
+      <fileset dir="../src">
+        <include name="example*"/>
+        <include name="*.java"/>
+      </fileset>
+    </copy>
+  </target>
+
+  <target name="tearDown">
+    <delete dir="${source.dir}"/>
+    <delete dir="${dest.dir}"/>
+  </target>
+
+  <target name="testCSC" depends="probe_for_apps" if="csc.found">
+    <property name="testCSC.exe"
+      location="${dest.dir}/ExampleCsc.exe" />
+    <au:assertFileDoesntExist file="${testCSC.exe}"/>
+    <dn:csc
+      destFile="${testCSC.exe}"
+      targetType="exe"
+      srcDir="${source.dir}"
+      >
+    </dn:csc>
+    <au:assertFileExists file="${testCSC.exe}"/>
+  </target>
+
+  <target name="testJSharpc" depends="probe_for_apps" if="jsharp.found">
+    <property name="testJSharp.exe"
+      location="${dest.dir}/jsharp.exe" />
+    <au:assertFileDoesntExist file="${testJSharp.exe}"/>
+    <dn:jsharpc
+      destFile="${testJSharp.exe}"
+      targetType="exe"
+      >
+      <src dir="${source.dir}" includes="*.java"/>
+    </dn:jsharpc>
+    <au:assertFileExists file="${testJSharp.exe}"/>
+  </target>
+
+  <target name="testVBC" depends="probe_for_apps" if="vbc.found">
+    <property name="testVBC.exe"
+      location="${dest.dir}/ExampleVbc.exe" />
+    <au:assertFileDoesntExist file="${testVBC.exe}"/>
+    <dn:vbc
+      destFile="${testVBC.exe}"
+      targetType="exe"
+      srcDir="${source.dir}"
+      >
+    </dn:vbc>
+    <au:assertFileExists file="${testVBC.exe}"/>
+  </target>
+
+  <target name="testIlasm" depends="probe_for_apps" if="ilasm.found">
+    <property name="testIlasm.exe"
+      location="${dest.dir}/ilasm.exe" />
+    <au:assertFileDoesntExist file="${testIlasm.exe}"/>
+    <dn:ilasm
+      destFile="${testIlasm.exe}"
+      targetType="exe"
+      >
+      <src dir="${source.dir}" includes="*.il"/>
+    </dn:ilasm>
+    <au:assertFileExists file="${testIlasm.exe}"/>
+  </target>
+
+</project>
\ No newline at end of file

Propchange: ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/compilation-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/wsdl-test.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/dotnet/trunk/src/tests/antunit/dir%20with%20spaces/wsdl-test.xml?view=auto&rev=497298
==============================================================================
--- ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/wsdl-test.xml (added)
+++ ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/wsdl-test.xml Wed Jan 17 21:00:20
2007
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+  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 name="compilation in dir with spaces" basedir="." default="echo"
+  xmlns:au="antlib:org.apache.ant.antunit"
+  xmlns:dn="antlib:org.apache.ant.dotnet">
+
+  <property name="source.dir" location="src"/>
+  <property name="dest.dir" location="dest"/>
+
+  <target name="probe_for_apps" >
+    <property environment="env"/>
+
+    <condition property="wsdl.found">
+      <or>
+        <available file="wsdl.exe" filepath="${env.Path}" />
+        <available file="wsdl"     filepath="${env.PATH}" />
+        <available file="wsdl.exe" filepath="${env.PATH}" />
+      </or>
+    </condition>
+
+  </target>
+
+  <target name="setUp">
+    <mkdir dir="${source.dir}"/>
+    <mkdir dir="${dest.dir}"/>
+    <copy todir="${source.dir}">
+      <fileset dir="../wsdl"/>
+    </copy>
+  </target>
+
+  <target name="tearDown">
+    <delete dir="${source.dir}"/>
+    <delete dir="${dest.dir}"/>
+  </target>
+
+  <target name="testWSDL" depends="probe_for_apps" if="wsdl.found">
+    <property name="testWSDL.in"
+      location="${source.dir}/StockQuoteService.wsdl" />
+    <property name="testWSDL.out"
+      location="${dest.dir}/StockQuoteService.cs" />
+    <au:assertFileDoesntExist file="${testWSDL.out}"/>
+    <dn:wsdltodotnet
+      destFile="${testWSDL.out}"
+      srcFile="${testWSDL.in}"
+      >
+    </dn:wsdltodotnet>
+    <au:assertFileExists file="${testWSDL.out}"/>
+  </target>
+</project>
\ No newline at end of file

Propchange: ant/antlibs/dotnet/trunk/src/tests/antunit/dir with spaces/wsdl-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ant/antlibs/dotnet/trunk/src/tests/antunit/src/example.vb
URL: http://svn.apache.org/viewvc/ant/antlibs/dotnet/trunk/src/tests/antunit/src/example.vb?view=auto&rev=497298
==============================================================================
--- ant/antlibs/dotnet/trunk/src/tests/antunit/src/example.vb (added)
+++ ant/antlibs/dotnet/trunk/src/tests/antunit/src/example.vb Wed Jan 17 21:00:20 2007
@@ -0,0 +1,22 @@
+REM  Licensed to the Apache Software Foundation (ASF) under one or more
+REM  contributor license agreements.  See the NOTICE file distributed with
+REM  this work for additional information regarding copyright ownership.
+REM  The ASF licenses this file to You under the Apache License, Version 2.0
+REM  (the "License"); you may not use this file except in compliance with
+REM  the License.  You may obtain a copy of the License at
+REM
+REM      http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM  Unless required by applicable law or agreed to in writing, software
+REM  distributed under the License is distributed on an "AS IS" BASIS,
+REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM  See the License for the specific language governing permissions and
+REM  limitations under the License.
+
+Imports System
+
+Class Example
+    Shared Sub Main()
+        Console.WriteLine("This is VB.NET")
+    End Sub
+End Class

Propchange: ant/antlibs/dotnet/trunk/src/tests/antunit/src/example.vb
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message