Author: massi
Date: 2007-01-17 16:33:36 -0500 (Wed, 17 Jan 2007)
New Revision: 71230

Added:
   trunk/mono/mono/tests/bug-80307.cs
Modified:
   trunk/mono/mono/tests/ChangeLog
   trunk/mono/mono/tests/Makefile.am
Log:
        * bug-80307.cs, Makefile.am: Added test for bug 80307.



Modified: trunk/mono/mono/tests/ChangeLog
===================================================================
--- trunk/mono/mono/tests/ChangeLog     2007-01-17 21:24:52 UTC (rev 71229)
+++ trunk/mono/mono/tests/ChangeLog     2007-01-17 21:33:36 UTC (rev 71230)
@@ -1,3 +1,6 @@
+2007-01-17  Massimiliano Mantione  <[EMAIL PROTECTED]>
+       * bug-80307.cs, Makefile.am: Added test for bug 80307.
+
 2007-01-15  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * load-missing.il: Add test for missing assembly reference in

Modified: trunk/mono/mono/tests/Makefile.am
===================================================================
--- trunk/mono/mono/tests/Makefile.am   2007-01-17 21:24:52 UTC (rev 71229)
+++ trunk/mono/mono/tests/Makefile.am   2007-01-17 21:33:36 UTC (rev 71230)
@@ -310,13 +310,13 @@
 
 # mkbundle works on ppc, but the pkg-config POC doesn't when run with make test
 if POWERPC
-test:  testjit test-type-load test-inline-call-stack
+test:  testjit test-type-load test-inline-call-stack test-bug-80307
 else
 # Can't use mkbundle on win32 since there is no static build there
 if PLATFORM_WIN32
-test:   testjit test-type-load test-inline-call-stack
+test:   testjit test-type-load test-inline-call-stack test-bug-80307
 else
-test:  testjit testbundle test-type-load test-inline-call-stack 
test-iomap-regression
+test:  testjit testbundle test-type-load test-inline-call-stack 
test-iomap-regression test-bug-80307
 endif
 endif
 
@@ -490,6 +490,12 @@
 test-inline-call-stack: TestDriver.dll test-inline-call-stack-library.dll 
test-inline-call-stack.exe
        $(RUNTIME) test-inline-call-stack.exe
 
+EXTRA_DIST += bug-80307.cs
+bug-80307.exe: $(srcdir)/bug-80307.cs
+       $(MCS) -r:System.Web bug-80307.cs
+test-bug-80307: bug-80307.exe
+       $(RUNTIME) bug-80307.exe
+
 # Useful if mono is compiled with --enable-shared=no
 patch-libtool:
        cp "../../libtool" .

Added: trunk/mono/mono/tests/bug-80307.cs
===================================================================
--- trunk/mono/mono/tests/bug-80307.cs  2007-01-17 21:24:52 UTC (rev 71229)
+++ trunk/mono/mono/tests/bug-80307.cs  2007-01-17 21:33:36 UTC (rev 71230)
@@ -0,0 +1,38 @@
+using System;
+using System.IO;
+using System.Web;
+using System.Web.Hosting;
+
+class TinyHost : MarshalByRefObject
+{
+       public static TinyHost CreateHost ()
+       {
+               string path = Directory.GetCurrentDirectory ();
+               string bin = Path.Combine (path, "bin");
+               string asm = Path.GetFileName (typeof 
(TinyHost).Assembly.Location);
+
+               Directory.CreateDirectory (bin);
+               File.Copy (asm, Path.Combine (bin, asm), true);
+
+               return (TinyHost) ApplicationHost.CreateApplicationHost (
+                       typeof (TinyHost), "/", path);
+
+       }
+
+       public void Execute (string page)
+       {
+               SimpleWorkerRequest req = new SimpleWorkerRequest (
+                       page, "", Console.Out);
+               HttpRuntime.ProcessRequest (req);
+       }
+
+       static void Main ()
+       {
+               TinyHost h = CreateHost ();
+               StreamWriter w = new StreamWriter ("page.aspx");
+               w.WriteLine (@"<%@ Page Language=""C#"" %>");
+               w.WriteLine (@"<% Console.WriteLine(""Hello""); %>");
+               w.Close ();
+               h.Execute ("page.aspx");
+       }
+}

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

Reply via email to