Author: gert
Date: 2007-10-31 17:45:45 -0500 (Wed, 31 Oct 2007)
New Revision: 88614
Added:
trunk/gert/standalone/bug337719/
trunk/gert/standalone/bug337719/default.build
trunk/gert/standalone/bug337719/test.cs
trunk/gert/standalone/bug338242/
trunk/gert/standalone/bug338242/default.build
trunk/gert/standalone/bug338242/test.cs
trunk/gert/standalone/bug338242/web/
trunk/gert/standalone/bug338242/web/Default.aspx
trunk/gert/standalone/bug338242/web/Default.aspx.cs
Modified:
trunk/gert/standalone/known-issues
Log:
Added test for bug #338242 and #337719.
Added: trunk/gert/standalone/bug337719/default.build
===================================================================
--- trunk/gert/standalone/bug337719/default.build 2007-10-31 22:18:31 UTC
(rev 88613)
+++ trunk/gert/standalone/bug337719/default.build 2007-10-31 22:45:45 UTC
(rev 88614)
@@ -0,0 +1,61 @@
+<project name="bug337719" 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="mono-3.5">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,NET_3_5,ONLY_3_5,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>
+
+ <target name="net-3.5">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,NET_3_5,ONLY_3_5" />
+ </target>
+
+ <property name="frameworks"
value="mono-1.0,mono-2.0,mono-3.5,net-1.1,net-2.0,net-3.5" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="out" />
+ <include name="test.dll" />
+ </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="compile" />
+ <call target="clean" />
+ </if>
+ </foreach>
+
+ <property name="nant.settings.currentframework"
value="${original.targetframework}" />
+ </target>
+
+ <target name="compile">
+ <csc target="library" output="test.dll" define="${csc.defines}"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="test.cs" />
+ </sources>
+ </csc>
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/standalone/bug337719/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug337719/test.cs
===================================================================
--- trunk/gert/standalone/bug337719/test.cs 2007-10-31 22:18:31 UTC (rev
88613)
+++ trunk/gert/standalone/bug337719/test.cs 2007-10-31 22:45:45 UTC (rev
88614)
@@ -0,0 +1,8 @@
+class Program
+{
+ public bool check (object from, object to)
+ {
+ if (from is int && to is int) return true;
+ return false;
+ }
+}
Property changes on: trunk/gert/standalone/bug337719/test.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug338242/default.build
===================================================================
--- trunk/gert/standalone/bug338242/default.build 2007-10-31 22:18:31 UTC
(rev 88613)
+++ trunk/gert/standalone/bug338242/default.build 2007-10-31 22:45:45 UTC
(rev 88614)
@@ -0,0 +1,84 @@
+<project name="bug338242" default="rebuild">
+ <target name="mono-1.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+ <property name="xsp.package" value="xsp" />
+ </target>
+
+ <target name="mono-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+ <property name="xsp.package" value="xsp-2" />
+ </target>
+
+ <target name="net-1.1">
+ <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
+ <property name="xsp.package" value="xsp" />
+ </target>
+
+ <target name="net-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+ <property name="xsp.package" value="xsp-2" />
+ </target>
+
+ <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="web/bin/**" />
+ <include name="out" />
+ <include name="test.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">
+ <mkdir dir="web/bin" />
+ <csc target="library" define="${csc.defines}"
output="web/bin/Mono.Web.dll" warnaserror="true" warninglevel="4">
+ <sources basedir="web">
+ <include name="Default.aspx.cs" />
+ </sources>
+ <references>
+ <include name="System.Web.dll" />
+ </references>
+ </csc>
+ <csc target="exe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="test.cs" />
+ </sources>
+ <references>
+ <include name="System.Web.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <exec
program="${pkg-config::get-variable(xsp.package,'Executable')}" managed="true"
spawn="true" pidproperty="server.pid">
+ <arg value="--root" />
+ <arg dir="web" />
+ <arg value="--port" />
+ <arg value="8081" />
+ </exec>
+ <sleep milliseconds="1000" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <kill pid="${server.pid}" />
+ <sleep milliseconds="1000" />
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/standalone/bug338242/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug338242/test.cs
===================================================================
--- trunk/gert/standalone/bug338242/test.cs 2007-10-31 22:18:31 UTC (rev
88613)
+++ trunk/gert/standalone/bug338242/test.cs 2007-10-31 22:45:45 UTC (rev
88614)
@@ -0,0 +1,34 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Web.UI;
+
+class Program
+{
+ static int Main ()
+ {
+ HttpWebRequest request = (HttpWebRequest) WebRequest.Create
("http://localhost:8081/Default.aspx");
+ request.Method = "GET";
+
+ try {
+ HttpWebResponse response = (HttpWebResponse)
request.GetResponse ();
+ using (StreamReader sr = new StreamReader
(response.GetResponseStream (), Encoding.UTF8, true)) {
+ string result = sr.ReadToEnd ();
+ if (result.IndexOf ("<p>test</p>") == -1) {
+ Console.WriteLine (result);
+ return 1;
+ }
+ }
+ response.Close ();
+ } catch (WebException ex) {
+ if (ex.Response != null) {
+ StreamReader sr = new StreamReader
(ex.Response.GetResponseStream ());
+ Console.WriteLine (sr.ReadToEnd ());
+ }
+ return 2;
+ }
+
+ return 0;
+ }
+}
Property changes on: trunk/gert/standalone/bug338242/test.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug338242/web/Default.aspx
===================================================================
--- trunk/gert/standalone/bug338242/web/Default.aspx 2007-10-31 22:18:31 UTC
(rev 88613)
+++ trunk/gert/standalone/bug338242/web/Default.aspx 2007-10-31 22:45:45 UTC
(rev 88614)
@@ -0,0 +1,10 @@
+<%@ Page Language="C#" CodeBehind="Default.aspx.cs" Inherits="_Default"
AutoEventWireup="True" %>
+<html>
+ <head runat="server">
+ </head>
+ <body>
+ <form runat="server">
+ <p>test</p>
+ </form>
+ </body>
+</html>
Property changes on: trunk/gert/standalone/bug338242/web/Default.aspx
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug338242/web/Default.aspx.cs
===================================================================
--- trunk/gert/standalone/bug338242/web/Default.aspx.cs 2007-10-31 22:18:31 UTC
(rev 88613)
+++ trunk/gert/standalone/bug338242/web/Default.aspx.cs 2007-10-31 22:45:45 UTC
(rev 88614)
@@ -0,0 +1,21 @@
+using System;
+using System.Web;
+#if NET_2_0
+using System.Web.Profile;
+#endif
+using System.Web.UI;
+
+public class _Default : Page
+{
+ public HttpApplication ApplicationInstance
+ {
+ get { return HttpContext.Current.ApplicationInstance; }
+ }
+
+#if NET_2_0
+ public DefaultProfile Profile
+ {
+ get { return (DefaultProfile) HttpContext.Current.Profile; }
+ }
+#endif
+}
Property changes on: trunk/gert/standalone/bug338242/web/Default.aspx.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues 2007-10-31 22:18:31 UTC (rev 88613)
+++ trunk/gert/standalone/known-issues 2007-10-31 22:45:45 UTC (rev 88614)
@@ -103,3 +103,4 @@
bug335329/**
bug335488/**
bug337997/**
+bug338242/**
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches