Author: gert
Date: 2008-02-05 13:32:54 -0500 (Tue, 05 Feb 2008)
New Revision: 94921
Added:
trunk/gert/standalone/bug357504/
trunk/gert/standalone/bug357504/default.build
trunk/gert/standalone/bug357504/test.cs
trunk/gert/standalone/bug357504/web/
trunk/gert/standalone/bug357504/web/Default.aspx
trunk/gert/standalone/bug357504/web/frame.master
Log:
Added test for bug #357504.
Added: trunk/gert/standalone/bug357504/default.build
===================================================================
--- trunk/gert/standalone/bug357504/default.build 2008-02-05 18:31:09 UTC
(rev 94920)
+++ trunk/gert/standalone/bug357504/default.build 2008-02-05 18:32:54 UTC
(rev 94921)
@@ -0,0 +1,48 @@
+<project name="bug357504" default="rebuild">
+ <include buildfile="../../build/common.build" />
+
+ <target name="mono-2.0-init">
+ <property name="xsp.package" value="xsp-2" />
+ </target>
+
+ <target name="net-2.0-init">
+ <property name="xsp.package" value="xsp-2" />
+ </target>
+
+ <property name="frameworks" value="mono-2.0,net-2.0" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="out" />
+ <include name="test.exe" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="compile" depends="init">
+ <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>
+ <references>
+ <include name="System.Web.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run-test" 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>
+</project>
Property changes on: trunk/gert/standalone/bug357504/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug357504/test.cs
===================================================================
--- trunk/gert/standalone/bug357504/test.cs 2008-02-05 18:31:09 UTC (rev
94920)
+++ trunk/gert/standalone/bug357504/test.cs 2008-02-05 18:32:54 UTC (rev
94921)
@@ -0,0 +1,39 @@
+using System;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Threading;
+
+class Program
+{
+ static int Main ()
+ {
+ Thread.CurrentThread.CurrentCulture =
CultureInfo.InvariantCulture;
+ Thread.CurrentThread.CurrentUICulture =
CultureInfo.InvariantCulture;
+
+ 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 ();
+ Assert.IsTrue (result.IndexOf ("Simple Master
Page") != -1, "#1:" + result);
+ Assert.IsTrue (result.IndexOf ("Welcome to
Master Pages!") != -1, "#2:" + result);
+ Assert.IsTrue (result.IndexOf ("<p>This is the
content of the master page file.</p>") != -1, "#3:" + result);
+ Assert.IsTrue (result.IndexOf ("This a common
page footer.") != -1, "#4:" + result);
+ }
+ response.Close ();
+ return 0;
+ } catch (WebException ex) {
+ HttpWebResponse response = (HttpWebResponse)
ex.Response;
+ if (response != null) {
+ using (StreamReader sr = new StreamReader
(response.GetResponseStream ())) {
+ Console.WriteLine (sr.ReadToEnd ());
+ }
+ }
+ return 1;
+ }
+ }
+}
Property changes on: trunk/gert/standalone/bug357504/test.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug357504/web/Default.aspx
===================================================================
--- trunk/gert/standalone/bug357504/web/Default.aspx 2008-02-05 18:31:09 UTC
(rev 94920)
+++ trunk/gert/standalone/bug357504/web/Default.aspx 2008-02-05 18:32:54 UTC
(rev 94921)
@@ -0,0 +1,11 @@
+<%@ Page Language="C#" MasterPageFile="frame.master" %>
+
+<asp:Content ID="Content1" ContentPlaceHolderID="title" Runat="server">
+Welcome to Master Pages!
+</asp:Content>
+
+<asp:Content ID="Content2" ContentPlaceHolderID="content" Runat="server">
+<p>This is the content of the master page file.</p>
+<p>This sample master page has two placeholders,
+one for the content and one for the title.</p>
+</asp:Content>
Property changes on: trunk/gert/standalone/bug357504/web/Default.aspx
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug357504/web/frame.master
===================================================================
--- trunk/gert/standalone/bug357504/web/frame.master 2008-02-05 18:31:09 UTC
(rev 94920)
+++ trunk/gert/standalone/bug357504/web/frame.master 2008-02-05 18:32:54 UTC
(rev 94921)
@@ -0,0 +1,23 @@
+<%@ Master Language="C#"%>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head runat="server">
+ <title>Simple Master Page</title>
+</head>
+<body bgcolor=black text=white>
+ <form id="form1" runat="server">
+ <span style="font-size:20px">
+ <asp:contentplaceholder id="title"
runat="server"></asp:contentplaceholder>
+ </span>
+ <table style="height:500px" width=80%><tr>
+ <td width = 50px></td>
+ <td style="background-color:white; color:black; padding:10px"
valign="top" >
+ <asp:contentplaceholder id="content"
runat="server"></asp:contentplaceholder>
+ </td>
+ </tr></table>
+ This a common page footer.
+ </form>
+</body>
+</html>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches