Author: gert
Date: 2007-05-15 14:42:21 -0400 (Tue, 15 May 2007)
New Revision: 77425
Added:
trunk/gert/interactive/bug79594/
trunk/gert/interactive/bug79594/MainForm.cs
trunk/gert/interactive/bug79594/default.build
trunk/gert/interactive/bug81499/
trunk/gert/interactive/bug81499/MainForm.cs
trunk/gert/interactive/bug81499/default.build
trunk/gert/interactive/bug81516/
trunk/gert/interactive/bug81516/MainForm.cs
trunk/gert/interactive/bug81516/default.build
Modified:
trunk/gert/interactive/known_issues
Log:
Added tests for bug #81516, #81499 and #79594.
Added: trunk/gert/interactive/bug79594/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug79594/MainForm.cs 2007-05-15 18:40:16 UTC (rev
77424)
+++ trunk/gert/interactive/bug79594/MainForm.cs 2007-05-15 18:42:21 UTC (rev
77425)
@@ -0,0 +1,87 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+ public MainForm ()
+ {
+ //
+ // MainForm
+ //
+ ClientSize = new Size (200, 90);
+ Location = new Point (350, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "bug #79594";
+ Load += new EventHandler (MainForm_Load);
+ Paint += new PaintEventHandler (MainForm_Paint);
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ Application.Run (new MainForm ());
+ }
+
+ void MainForm_Load (object sender, EventArgs e)
+ {
+ InstructionsForm instructionsForm = new InstructionsForm ();
+ instructionsForm.Show ();
+ }
+
+ void MainForm_Paint (object o, PaintEventArgs args)
+ {
+ StringFormat format = new StringFormat ();
+ format.Alignment = StringAlignment.Center;
+ string text = "this is really long
text........................................... with a lot o periods.";
+ SizeF sz = args.Graphics.MeasureString (text, Font, 80, format);
+ Rectangle bounds = new Rectangle (60, 8, 80, 80);
+ args.Graphics.DrawString (text, Font,
SystemBrushes.ControlText, bounds, format);
+
+ bounds.Height = (int) sz.Height;
+ args.Graphics.DrawRectangle (new Pen (Color.Black), bounds);
+ }
+}
+
+public class InstructionsForm : Form
+{
+ public InstructionsForm ()
+ {
+ //
+ // _tabControl
+ //
+ _tabControl = new TabControl ();
+ _tabControl.Dock = DockStyle.Fill;
+ Controls.Add (_tabControl);
+ //
+ // _bugDescriptionText1
+ //
+ _bugDescriptionText1 = new TextBox ();
+ _bugDescriptionText1.Multiline = true;
+ _bugDescriptionText1.Dock = DockStyle.Fill;
+ _bugDescriptionText1.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Expected result on start-up:{0}{0}" +
+ "1. The text in the rectangle is spread over 6
lines.{0}{0}" +
+ "2. The text on each line is centered horizontally.",
+ Environment.NewLine);
+ //
+ // _tabPage1
+ //
+ _tabPage1 = new TabPage ();
+ _tabPage1.Text = "#1";
+ _tabPage1.Controls.Add (_bugDescriptionText1);
+ _tabControl.Controls.Add (_tabPage1);
+ //
+ // InstructionsForm
+ //
+ ClientSize = new Size (330, 110);
+ Location = new Point (600, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "Instructions - bug #79594";
+ }
+
+ private TextBox _bugDescriptionText1;
+ private TabControl _tabControl;
+ private TabPage _tabPage1;
+}
Property changes on: trunk/gert/interactive/bug79594/MainForm.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug79594/default.build
===================================================================
--- trunk/gert/interactive/bug79594/default.build 2007-05-15 18:40:16 UTC
(rev 77424)
+++ trunk/gert/interactive/bug79594/default.build 2007-05-15 18:42:21 UTC
(rev 77425)
@@ -0,0 +1,62 @@
+<project name="bug79594" 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="winexe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="MainForm.cs" />
+ </sources>
+ <references>
+ <include name="System.Drawing.dll" />
+ <include name="System.Windows.Forms.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <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/interactive/bug79594/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug81499/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug81499/MainForm.cs 2007-05-15 18:40:16 UTC (rev
77424)
+++ trunk/gert/interactive/bug81499/MainForm.cs 2007-05-15 18:42:21 UTC (rev
77425)
@@ -0,0 +1,177 @@
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Globalization;
+using System.IO;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+ public MainForm ()
+ {
+ //
+ // _fileListBox
+ //
+ _fileListBox = new ListBox ();
+ _fileListBox.Dock = DockStyle.Top;
+ _fileListBox.Height = 100;
+ Controls.Add (_fileListBox);
+ //
+ // _supportMultiDottedCheckBox
+ //
+ _supportMultiDottedCheckBox = new CheckBox ();
+ _supportMultiDottedCheckBox.Checked = false;
+ _supportMultiDottedCheckBox.Location = new Point (8, 110);
+ _supportMultiDottedCheckBox.Size = new Size (200, 20);
+ _supportMultiDottedCheckBox.Text = "Support Multidotted
Extension";
+ Controls.Add (_supportMultiDottedCheckBox);
+ //
+ // _saveFileButton
+ //
+ _saveFileButton = new Button ();
+ _saveFileButton.Location = new Point (240, 110);
+ _saveFileButton.Size = new Size (100, 20);
+ _saveFileButton.Text = "Save File";
+ _saveFileButton.Click += new EventHandler
(SaveFileButton_Click);
+ Controls.Add (_saveFileButton);
+ //
+ // MainForm
+ //
+ ClientSize = new Size (350, 140);
+ Location = new Point (250, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "bug #81499";
+ Load += new EventHandler (MainForm_Load);
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ Application.Run (new MainForm ());
+ }
+
+ void MainForm_Load (object sender, EventArgs e)
+ {
+ InstructionsForm instructionsForm = new InstructionsForm ();
+ instructionsForm.Show ();
+
+#if ONLY_1_1
+ _supportMultiDottedCheckBox.Checked = false;
+ _supportMultiDottedCheckBox.Enabled = false;
+#endif
+ }
+
+ void SaveFileButton_Click (object sender, EventArgs e)
+ {
+ _fileListBox.Items.Clear ();
+
+ _saveFileDialog = new SaveFileDialog ();
+#if NET_2_0
+ _saveFileDialog.SupportMultiDottedExtensions =
_supportMultiDottedCheckBox.Checked;
+#endif
+ _saveFileDialog.Filter = "Doc files (*.doc)|*.foo.doc|All
files|*.*";
+ _saveFileDialog.ShowDialog ();
+
+ foreach (string file in _saveFileDialog.FileNames) {
+ _fileListBox.Items.Add (file);
+ }
+ }
+
+ private ListBox _fileListBox;
+ private CheckBox _supportMultiDottedCheckBox;
+ private Button _saveFileButton;
+ private SaveFileDialog _saveFileDialog;
+}
+
+public class InstructionsForm : Form
+{
+ public InstructionsForm ()
+ {
+ //
+ // _tabControl
+ //
+ _tabControl = new TabControl ();
+ _tabControl.Dock = DockStyle.Fill;
+ Controls.Add (_tabControl);
+#if NET_2_0
+ //
+ // _bugDescriptionText1
+ //
+ _bugDescriptionText1 = new TextBox ();
+ _bugDescriptionText1.Multiline = true;
+ _bugDescriptionText1.Dock = DockStyle.Fill;
+ _bugDescriptionText1.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Steps to execute:{0}{0}" +
+ "1. Uncheck the Support Multidotted Extension
checkbox.{0}{0}" +
+ "2. Click the Save File button.{0}{0}" +
+ "3. Enter \"abc\" in the \"File name\" combobox.{0}{0}"
+
+ "4. Click the Save button.{0}{0}" +
+ "Expected result:{0}{0}" +
+ "1. The listbox contains an entry with file name
\"...{1}abc.doc\".",
+ Environment.NewLine, Path.DirectorySeparatorChar);
+#else
+ //
+ // _bugDescriptionText1
+ //
+ _bugDescriptionText1 = new TextBox ();
+ _bugDescriptionText1.Multiline = true;
+ _bugDescriptionText1.Dock = DockStyle.Fill;
+ _bugDescriptionText1.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Steps to execute:{0}{0}" +
+ "1. Click the Save File button.{0}{0}" +
+ "2. Enter \"abc\" in the \"File name\" combobox.{0}{0}"
+
+ "3. Click the Save button.{0}{0}" +
+ "Expected result:{0}{0}" +
+ "1. The listbox contains an entry with file name
\"...{1}abc.doc\".",
+ Environment.NewLine, Path.DirectorySeparatorChar);
+#endif
+ //
+ // _tabPage1
+ //
+ _tabPage1 = new TabPage ();
+ _tabPage1.Text = "#1";
+ _tabPage1.Controls.Add (_bugDescriptionText1);
+ _tabControl.Controls.Add (_tabPage1);
+#if NET_2_0
+ //
+ // _bugDescriptionText2
+ //
+ _bugDescriptionText2 = new TextBox ();
+ _bugDescriptionText2.Multiline = true;
+ _bugDescriptionText2.Dock = DockStyle.Fill;
+ _bugDescriptionText2.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Steps to execute:{0}{0}" +
+ "1. Check the Support Multidotted Extension
checkbox.{0}{0}" +
+ "2. Click the Save File button.{0}{0}" +
+ "3. Enter \"abc\" in the \"File name\" combobox.{0}{0}"
+
+ "4. Click the Save button.{0}{0}" +
+ "Expected result:{0}{0}" +
+ "1. The listbox contains an entry with file name
\"...{1}abc.doc.foo\".",
+ Environment.NewLine, Path.DirectorySeparatorChar);
+ //
+ // _tabPage2
+ //
+ _tabPage2 = new TabPage ();
+ _tabPage2.Text = "#2";
+ _tabPage2.Controls.Add (_bugDescriptionText2);
+ _tabControl.Controls.Add (_tabPage2);
+#endif
+ //
+ // InstructionsForm
+ //
+ ClientSize = new Size (330, 230);
+ Location = new Point (650, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "Instructions - bug #81499";
+ }
+
+ private TextBox _bugDescriptionText1;
+#if NET_2_0
+ private TextBox _bugDescriptionText2;
+#endif
+ private TabControl _tabControl;
+ private TabPage _tabPage1;
+#if NET_2_0
+ private TabPage _tabPage2;
+#endif
+}
Property changes on: trunk/gert/interactive/bug81499/MainForm.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug81499/default.build
===================================================================
--- trunk/gert/interactive/bug81499/default.build 2007-05-15 18:40:16 UTC
(rev 77424)
+++ trunk/gert/interactive/bug81499/default.build 2007-05-15 18:42:21 UTC
(rev 77425)
@@ -0,0 +1,62 @@
+<project name="bug81499" 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="winexe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="MainForm.cs" />
+ </sources>
+ <references>
+ <include name="System.Drawing.dll" />
+ <include name="System.Windows.Forms.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <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/interactive/bug81499/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug81516/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug81516/MainForm.cs 2007-05-15 18:40:16 UTC (rev
77424)
+++ trunk/gert/interactive/bug81516/MainForm.cs 2007-05-15 18:42:21 UTC (rev
77425)
@@ -0,0 +1,100 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+ public MainForm ()
+ {
+ //
+ // _customControl
+ //
+ _customControl = new CustomControl ();
+ _customControl.BackColor = Color.Yellow;
+ _customControl.Location = new Point (5, 5);
+ _customControl.Parent = this;
+ _customControl.Size = new Size (50, 50);
+ Controls.Add (_customControl);
+ //
+ // MainForm
+ //
+ ClientSize = new Size (200, 70);
+ Location = new Point (350, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "bug #81516";
+ Load += new EventHandler (MainForm_Load);
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ Application.Run (new MainForm ());
+ }
+
+ void MainForm_Load (object sender, EventArgs e)
+ {
+ InstructionsForm instructionsForm = new InstructionsForm ();
+ instructionsForm.Show ();
+ }
+
+ private CustomControl _customControl;
+}
+
+public class CustomControl : Control
+{
+ protected override void OnPaint (PaintEventArgs args)
+ {
+ Graphics g = args.Graphics;
+
+ SolidBrush brush = new SolidBrush (ForeColor);
+ StringFormat sformat = new StringFormat ();
+ sformat.FormatFlags = StringFormatFlags.LineLimit;
+ g.DrawString ("WeShouldIncludeWhiteSpaces", Font, brush, new
Rectangle (0, 0, 55, 100),
+ sformat);
+ brush.Dispose ();
+ sformat.Dispose ();
+ }
+}
+
+public class InstructionsForm : Form
+{
+ public InstructionsForm ()
+ {
+ //
+ // _tabControl
+ //
+ _tabControl = new TabControl ();
+ _tabControl.Dock = DockStyle.Fill;
+ Controls.Add (_tabControl);
+ //
+ // _bugDescriptionText1
+ //
+ _bugDescriptionText1 = new TextBox ();
+ _bugDescriptionText1.Multiline = true;
+ _bugDescriptionText1.Dock = DockStyle.Fill;
+ _bugDescriptionText1.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Expected result on start-up:{0}{0}" +
+ "1. A yellow shape is drawn containing the text
\"WeShouldInclude" +
+ "WhiteSpaces\" spread over multiple lines.",
+ Environment.NewLine);
+ //
+ // _tabPage1
+ //
+ _tabPage1 = new TabPage ();
+ _tabPage1.Text = "#1";
+ _tabPage1.Controls.Add (_bugDescriptionText1);
+ _tabControl.Controls.Add (_tabPage1);
+ //
+ // InstructionsForm
+ //
+ ClientSize = new Size (330, 110);
+ Location = new Point (600, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "Instructions - bug #81516";
+ }
+
+ private TextBox _bugDescriptionText1;
+ private TabControl _tabControl;
+ private TabPage _tabPage1;
+}
Property changes on: trunk/gert/interactive/bug81516/MainForm.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug81516/default.build
===================================================================
--- trunk/gert/interactive/bug81516/default.build 2007-05-15 18:40:16 UTC
(rev 77424)
+++ trunk/gert/interactive/bug81516/default.build 2007-05-15 18:42:21 UTC
(rev 77425)
@@ -0,0 +1,62 @@
+<project name="bug81516" 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="winexe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="MainForm.cs" />
+ </sources>
+ <references>
+ <include name="System.Drawing.dll" />
+ <include name="System.Windows.Forms.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <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/interactive/bug81516/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/gert/interactive/known_issues
===================================================================
--- trunk/gert/interactive/known_issues 2007-05-15 18:40:16 UTC (rev 77424)
+++ trunk/gert/interactive/known_issues 2007-05-15 18:42:21 UTC (rev 77425)
@@ -1,3 +1,6 @@
bug81598/**
bug81610/**
bug81611/**
+bug81616/**
+bug81621/**
+bug81622/**
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches