Author: gert
Date: 2007-12-09 15:02:42 -0500 (Sun, 09 Dec 2007)
New Revision: 91013

Added:
   trunk/gert/standalone/bug347193/
   trunk/gert/standalone/bug347193/Lang.cs
   trunk/gert/standalone/bug347193/default.build
   trunk/gert/standalone/bug347193/test.cs
   trunk/gert/standalone/bug347193/test.snk
Modified:
   trunk/gert/standalone/known-issues
Log:
Added test for bug #347193.


Added: trunk/gert/standalone/bug347193/Lang.cs
===================================================================
--- trunk/gert/standalone/bug347193/Lang.cs     2007-12-09 19:22:36 UTC (rev 
91012)
+++ trunk/gert/standalone/bug347193/Lang.cs     2007-12-09 20:02:42 UTC (rev 
91013)
@@ -0,0 +1,15 @@
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyVersion ("1.0.0.0")]
+[assembly: AssemblyCulture ("en-US")]
+
+#if ONLY_1_1 && !MONO
+[assembly: AssemblyKeyFile ("test.snk")]
+#endif
+
+public class Lang
+{
+}


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

Added: trunk/gert/standalone/bug347193/default.build
===================================================================
--- trunk/gert/standalone/bug347193/default.build       2007-12-09 19:22:36 UTC 
(rev 91012)
+++ trunk/gert/standalone/bug347193/default.build       2007-12-09 20:02:42 UTC 
(rev 91013)
@@ -0,0 +1,51 @@
+       <project name="bug347174" default="rebuild">
+       <include buildfile="../../build/common.build" />
+       
+       <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
+
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="en-US/**" />
+                               <include name="en/**" />
+                               <include name="Lang.dll" />
+                               <include name="out" />
+                               <include name="test.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="compile" depends="init">
+               <csc target="library" define="${csc.defines}" 
keyfile="test.snk" output="Lang.dll" warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="Lang.cs" />
+                       </sources>
+               </csc>
+               <csc target="exe" define="${csc.defines}" keyfile="test.snk" 
output="test.exe" warnaserror="true" warninglevel="4">
+                       <nowarn>
+                               <warning number="1607" />
+                       </nowarn>
+                       <sources>
+                               <include name="../../build/common/Assert.cs" />
+                               <include name="test.cs" />
+                       </sources>
+                       <references>
+                               <include name="Lang.dll" />
+                       </references>
+               </csc>
+       </target>
+
+       <target name="run-test" depends="compile">
+               <copy todir="en-US" file="Lang.dll" />
+               <copy todir="en" file="Lang.dll" />
+               <exec program="test.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}">#A1</fail>
+
+               <delete dir="en-US" />
+               <exec program="test.exe" managed="true" output="out" 
resultproperty="exitcode" failonerror="false" />
+               <fail if="${int::parse(exitcode)==0}">#B1</fail>
+               <fail unless="${file::exists('out')}">#B2</fail>
+               <loadfile file="out" property="out" />
+               <fail unless="${string::index-of(out,'FileNotFoundException') 
!= -1}">#B3</fail>
+       </target>
+</project>


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

Added: trunk/gert/standalone/bug347193/test.cs
===================================================================
--- trunk/gert/standalone/bug347193/test.cs     2007-12-09 19:22:36 UTC (rev 
91012)
+++ trunk/gert/standalone/bug347193/test.cs     2007-12-09 20:02:42 UTC (rev 
91013)
@@ -0,0 +1,17 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+class Program
+{
+       static void Main ()
+       {
+               Assembly a = typeof (Lang).Assembly;
+               string dir = Path.Combine 
(AppDomain.CurrentDomain.BaseDirectory,
+                       "en-US");
+               string expected = Path.Combine (dir, "Lang.dll");
+               string actual = a.Location;
+               int result = string.Compare (expected, actual, true);
+               Assert.AreEqual (0, result, "#1:" + actual);
+       }
+}


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

Added: trunk/gert/standalone/bug347193/test.snk
===================================================================
(Binary files differ)


Property changes on: trunk/gert/standalone/bug347193/test.snk
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues  2007-12-09 19:22:36 UTC (rev 91012)
+++ trunk/gert/standalone/known-issues  2007-12-09 20:02:42 UTC (rev 91013)
@@ -136,3 +136,5 @@
 bug345449/**
 bug345627/**
 bug346762/**
+bug347174/**
+bug347193/**

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

Reply via email to