Author: gert
Date: 2007-08-23 07:46:56 -0400 (Thu, 23 Aug 2007)
New Revision: 84690

Added:
   trunk/gert/standalone/bug81446/Index1.aspx.cs
   trunk/gert/standalone/bug81446/Index2.aspx.cs
   trunk/gert/standalone/bug81446/web/Index1.aspx
   trunk/gert/standalone/bug81446/web/Index2.aspx
   trunk/gert/standalone/bug82545/
   trunk/gert/standalone/bug82545/default.build
   trunk/gert/standalone/bug82545/test.cs
Modified:
   trunk/gert/standalone/bug81446/default.build
   trunk/gert/standalone/bug81446/test.cs
   trunk/gert/standalone/known-issues
Log:
Added test for bug #82545 and improved test for bug #81466.


Added: trunk/gert/standalone/bug81446/Index1.aspx.cs
===================================================================
--- trunk/gert/standalone/bug81446/Index1.aspx.cs       2007-08-23 10:57:47 UTC 
(rev 84689)
+++ trunk/gert/standalone/bug81446/Index1.aspx.cs       2007-08-23 11:46:56 UTC 
(rev 84690)
@@ -0,0 +1,9 @@
+using System;
+using System.Web.UI;
+
+public class Index1 : Page
+{
+       private void Page_Load(object sender, EventArgs e)
+       {
+       }
+}


Property changes on: trunk/gert/standalone/bug81446/Index1.aspx.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81446/Index2.aspx.cs
===================================================================
--- trunk/gert/standalone/bug81446/Index2.aspx.cs       2007-08-23 10:57:47 UTC 
(rev 84689)
+++ trunk/gert/standalone/bug81446/Index2.aspx.cs       2007-08-23 11:46:56 UTC 
(rev 84690)
@@ -0,0 +1,9 @@
+using System;
+using System.Web.UI;
+
+public class Index2 : Page
+{
+       private void Page_Load(object sender, EventArgs e)
+       {
+       }
+}


Property changes on: trunk/gert/standalone/bug81446/Index2.aspx.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/gert/standalone/bug81446/default.build
===================================================================
--- trunk/gert/standalone/bug81446/default.build        2007-08-23 10:57:47 UTC 
(rev 84689)
+++ trunk/gert/standalone/bug81446/default.build        2007-08-23 11:46:56 UTC 
(rev 84690)
@@ -60,6 +60,16 @@
                                <include name="System.Configuration.dll" />
                        </references>
                </csc>
+               <csc target="library" define="${csc.defines}" 
output="web/libraries/Mono.Web1.dll" warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="Index1.aspx.cs" />
+                       </sources>
+               </csc>
+               <csc target="library" define="${csc.defines}" 
output="web/bin/Mono.Web2.dll" warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="Index2.aspx.cs" />
+                       </sources>
+               </csc>
                <csc target="library" define="${csc.defines}" 
output="web/bin/test.web.dll" warnaserror="true" warninglevel="4">
                        <nowarn>
                                <warning number="0618" />

Modified: trunk/gert/standalone/bug81446/test.cs
===================================================================
--- trunk/gert/standalone/bug81446/test.cs      2007-08-23 10:57:47 UTC (rev 
84689)
+++ trunk/gert/standalone/bug81446/test.cs      2007-08-23 11:46:56 UTC (rev 
84690)
@@ -61,6 +61,26 @@
                }
 #endif
 
+               sw.GetStringBuilder ().Length = 0;
+               h.Execute ("Index1.aspx", sw);
+               result = sw.ToString ();
+               if (result.IndexOf ("Index1-OK") != -1) {
+                       Console.WriteLine (result);
+                       return 4;
+               }
+               if (result.IndexOf ("Could not load type 'Index1'") == -1) {
+                       Console.WriteLine (result);
+                       return 5;
+               }
+
+               sw.GetStringBuilder ().Length = 0;
+               h.Execute ("Index2.aspx", sw);
+               result = sw.ToString ();
+               if (result.IndexOf ("Index2-OK") == -1) {
+                       Console.WriteLine (result);
+                       return 6;
+               }
+
                return 0;
        }
 }

Added: trunk/gert/standalone/bug81446/web/Index1.aspx
===================================================================
--- trunk/gert/standalone/bug81446/web/Index1.aspx      2007-08-23 10:57:47 UTC 
(rev 84689)
+++ trunk/gert/standalone/bug81446/web/Index1.aspx      2007-08-23 11:46:56 UTC 
(rev 84690)
@@ -0,0 +1,11 @@
+<%@ Page language="c#" AutoEventWireup="false" Inherits="Index1" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+<title>Index1-OK</title>
+</head>
+<body>
+       <form id="form1" runat="server">
+       </form>
+</body>
+</html>


Property changes on: trunk/gert/standalone/bug81446/web/Index1.aspx
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug81446/web/Index2.aspx
===================================================================
--- trunk/gert/standalone/bug81446/web/Index2.aspx      2007-08-23 10:57:47 UTC 
(rev 84689)
+++ trunk/gert/standalone/bug81446/web/Index2.aspx      2007-08-23 11:46:56 UTC 
(rev 84690)
@@ -0,0 +1,11 @@
+<%@ Page language="c#" AutoEventWireup="false" Inherits="Index2" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+<title>Index2-OK</title>
+</head>
+<body>
+       <form id="form1" runat="server">
+       </form>
+</body>
+</html>


Property changes on: trunk/gert/standalone/bug81446/web/Index2.aspx
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug82545/default.build
===================================================================
--- trunk/gert/standalone/bug82545/default.build        2007-08-23 10:57:47 UTC 
(rev 84689)
+++ trunk/gert/standalone/bug82545/default.build        2007-08-23 11:46:56 UTC 
(rev 84690)
@@ -0,0 +1,58 @@
+<project name="bug82545" 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="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">
+               <csc target="exe" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="test.cs" />
+                       </sources>
+               </csc>
+       </target>
+
+       <target name="run" depends="compile" unless="${platform::is-unix()}">
+               <exec program="test.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}" />
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


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

Added: trunk/gert/standalone/bug82545/test.cs
===================================================================
--- trunk/gert/standalone/bug82545/test.cs      2007-08-23 10:57:47 UTC (rev 
84689)
+++ trunk/gert/standalone/bug82545/test.cs      2007-08-23 11:46:56 UTC (rev 
84690)
@@ -0,0 +1,36 @@
+using System;
+using System.IO;
+
+class Program
+{
+       static int Main ()
+       {
+               string [] files = Directory.GetFiles ("c:\\");
+               bool foundPageFile = false;
+               foreach (string file in files) {
+                       if (file == @"c:\pagefile.sys") {
+                               foundPageFile = true;
+                               break;
+                       }
+               }
+
+               if (!foundPageFile)
+                       return 1;
+
+               FileInfo fi = new FileInfo (@"c:\pagefile.sys");
+               if (!fi.Exists)
+                       return 2;
+               if (fi.Attributes != (FileAttributes.Archive | 
FileAttributes.System | FileAttributes.Hidden))
+                       return 3;
+               if (fi.FullName != @"c:\pagefile.sys")
+                       return 4;
+               if (fi.Name != "pagefile.sys")
+                       return 5;
+               if (fi.Length <= 0)
+                       return 6;
+               if (fi.LastAccessTime == DateTime.MinValue)
+                       return 7;
+
+               return 0;
+       }
+}


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

Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues  2007-08-23 10:57:47 UTC (rev 84689)
+++ trunk/gert/standalone/known-issues  2007-08-23 11:46:56 UTC (rev 84690)
@@ -71,3 +71,4 @@
 bug82443/**
 bug82461/**
 bug82465/**
+bug82545/**

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

Reply via email to