Author: gert
Date: 2007-09-08 03:25:36 -0400 (Sat, 08 Sep 2007)
New Revision: 85511

Added:
   trunk/gert/standalone/bug82746/
   trunk/gert/standalone/bug82746/default.build
   trunk/gert/standalone/bug82746/test1.cs
   trunk/gert/standalone/bug82746/test2.cs
Log:
Added test for bug #82746.


Added: trunk/gert/standalone/bug82746/default.build
===================================================================
--- trunk/gert/standalone/bug82746/default.build        2007-09-07 21:25:29 UTC 
(rev 85510)
+++ trunk/gert/standalone/bug82746/default.build        2007-09-08 07:25:36 UTC 
(rev 85511)
@@ -0,0 +1,72 @@
+<project name="bug82746" default="rebuild">
+       <target name="mono-1.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+       </target>
+
+       <target name="mono-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+       </target>
+
+       <target name="net-1.1">
+               <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
+       </target>
+
+       <target name="net-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+       </target>
+
+       <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
+
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="out" />
+                               <include name="test1.exe" />
+                               <include name="test2.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="build">
+               <property name="original.targetframework" 
value="${nant.settings.currentframework}" />
+
+               <foreach property="framework" item="String" in="${frameworks}" 
delim=",">
+                       <if test="${framework::exists(framework)}">
+                               <property name="nant.settings.currentframework" 
value="${framework}" />
+                               <call 
target="${nant.settings.currentframework}" />
+                               <call target="run" />
+                               <call target="clean" />
+                       </if>
+               </foreach>
+
+               <property name="nant.settings.currentframework" 
value="${original.targetframework}" />
+       </target>
+
+       <target name="compile">
+               <csc target="exe" define="${csc.defines}" output="test1.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="test1.cs" />
+                       </sources>
+                       <references>
+                               <include name="System.Windows.Forms.dll" />
+                       </references>
+               </csc>
+               <csc target="exe" define="${csc.defines}" output="test2.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="test2.cs" />
+                       </sources>
+                       <references>
+                               <include name="System.Windows.Forms.dll" />
+                       </references>
+               </csc>
+       </target>
+
+       <target name="run" depends="compile">
+               <exec program="test1.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}">#1</fail>
+               <exec program="test2.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}">#2</fail>
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


Property changes on: trunk/gert/standalone/bug82746/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug82746/test1.cs
===================================================================
--- trunk/gert/standalone/bug82746/test1.cs     2007-09-07 21:25:29 UTC (rev 
85510)
+++ trunk/gert/standalone/bug82746/test1.cs     2007-09-08 07:25:36 UTC (rev 
85511)
@@ -0,0 +1,15 @@
+using System.Reflection;
+using System.Windows.Forms;
+
+[assembly: AssemblyInformationalVersion ("1.2.3.4")]
+[assembly: AssemblyVersion ("5.6.7.8")]
+
+class Program
+{
+       static int Main ()
+       {
+               if (Application.ProductVersion != "1.2.3.4")
+                       return 1;
+               return 0;
+       }
+}


Property changes on: trunk/gert/standalone/bug82746/test1.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug82746/test2.cs
===================================================================
--- trunk/gert/standalone/bug82746/test2.cs     2007-09-07 21:25:29 UTC (rev 
85510)
+++ trunk/gert/standalone/bug82746/test2.cs     2007-09-08 07:25:36 UTC (rev 
85511)
@@ -0,0 +1,14 @@
+using System.Reflection;
+using System.Windows.Forms;
+
+[assembly: AssemblyVersion ("5.6.7.8")]
+
+class Program
+{
+       static int Main ()
+       {
+               if (Application.ProductVersion != "5.6.7.8")
+                       return 1;
+               return 0;
+       }
+}


Property changes on: trunk/gert/standalone/bug82746/test2.cs
___________________________________________________________________
Name: svn:eol-style
   + native

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to