**** Merged from MCS ****
[mono-project.git] / mcs / class / System / Test / System.Text.RegularExpressions / PerlTest.cs
blob82952f52f17881d6891dcf90465112b09d4b3173
1 //
2 // assembly: System_test
3 // namespace: MonoTests.System.Text.RegularExpressions
4 // file: PerlTest.cs
5 //
6 // Authors:
7 // Dan Lewis (dlewis@gmx.co.uk)
8 // Martin Willemoes Hansen (mwh@sysrq.dk)
9 //
10 // (c) 2002 Dan Lewis
11 // (c) 2003 Martin Willemoes Hansen
13 using System;
14 using System.Text.RegularExpressions;
16 using NUnit.Framework;
18 namespace MonoTests.System.Text.RegularExpressions {
21 [TestFixture]
22 public class PerlTest {
24 [Test]
25 public void Trials () {
26 string msg = "";
27 foreach (RegexTrial trial in PerlTrials.trials) {
28 string actual = trial.Execute ();
29 if (actual != trial.Expected) {
30 msg += "\t" + trial.ToString () +
31 "Expected " + trial.Expected +
32 " but got " + actual + "\n";
34 if ( trial.Error != "" )
35 msg += "\n" + trial.Error;
38 //Assertion.Fail (
39 // trial.ToString () +
40 // "Expected " + trial.Expected +
41 // " but got " + actual
42 //);
45 if (msg != "" )
46 Assertion.Fail("\n" + msg);