Author: gert
Date: 2008-02-10 10:08:48 -0500 (Sun, 10 Feb 2008)
New Revision: 95380
Added:
trunk/gert/standalone/bug318231/
trunk/gert/standalone/bug318231/default.build
trunk/gert/standalone/bug318231/lib.cs
trunk/gert/standalone/bug318231/test.cs
Modified:
trunk/gert/standalone/known-issues
Log:
Added test for bug #318231.
Added: trunk/gert/standalone/bug318231/default.build
===================================================================
--- trunk/gert/standalone/bug318231/default.build 2008-02-10 14:58:08 UTC
(rev 95379)
+++ trunk/gert/standalone/bug318231/default.build 2008-02-10 15:08:48 UTC
(rev 95380)
@@ -0,0 +1,34 @@
+<project name="bug318231" 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="lib.dll" />
+ <include name="out" />
+ <include name="test.exe" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="compile" depends="init">
+ <csc target="library" define="${csc.defines}" output="lib.dll"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="lib.cs" />
+ </sources>
+ </csc>
+ <csc target="exe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="../../build/common/Assert.cs" />
+ <include name="test.cs" />
+ </sources>
+ </csc>
+ </target>
+
+ <target name="run-test" depends="compile">
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ </target>
+</project>
Property changes on: trunk/gert/standalone/bug318231/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug318231/lib.cs
===================================================================
--- trunk/gert/standalone/bug318231/lib.cs 2008-02-10 14:58:08 UTC (rev
95379)
+++ trunk/gert/standalone/bug318231/lib.cs 2008-02-10 15:08:48 UTC (rev
95380)
@@ -0,0 +1,2 @@
+[assembly: System.Resources.NeutralResourcesLanguage ("doesnot-exist")]
+[assembly: System.Reflection.AssemblyCulture ("doesnot-exist")]
Property changes on: trunk/gert/standalone/bug318231/lib.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug318231/test.cs
===================================================================
--- trunk/gert/standalone/bug318231/test.cs 2008-02-10 14:58:08 UTC (rev
95379)
+++ trunk/gert/standalone/bug318231/test.cs 2008-02-10 15:08:48 UTC (rev
95380)
@@ -0,0 +1,25 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+class Program
+{
+ static void Main ()
+ {
+ string dir = AppDomain.CurrentDomain.BaseDirectory;
+
+ Assembly a = Assembly.LoadFrom (Path.Combine (dir, "lib.dll"));
+ Assert.AreEqual ("lib, Version=0.0.0.0, Culture=doesnot-exist,
PublicKeyToken=null", a.FullName, "#A");
+
+ try {
+ a.GetName ();
+ Assert.Fail ("#B1");
+ } catch (ArgumentException ex) {
+ Assert.AreEqual (typeof (ArgumentException), ex.GetType
(), "#B2");
+ Assert.IsNull (ex.InnerException, "#B3");
+ Assert.IsNotNull (ex.Message, "#B4");
+ Assert.IsTrue (ex.Message.IndexOf ("doesnot-exist") !=
-1, "#B5");
+ Assert.AreEqual ("name", ex.ParamName, "#B6");
+ }
+ }
+}
Property changes on: trunk/gert/standalone/bug318231/test.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues 2008-02-10 14:58:08 UTC (rev 95379)
+++ trunk/gert/standalone/known-issues 2008-02-10 15:08:48 UTC (rev 95380)
@@ -77,6 +77,7 @@
bug315969/**
bug317488/**
bug317737/**
+bug318231/**
bug318463/**
bug319456/**
bug319992/**
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches