PerlTest.cs 772 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // assembly: System_test
  3. // namespace: MonoTests.System.Text.RegularExpressions
  4. // file: PerlTest.cs
  5. //
  6. // Authors:
  7. // Dan Lewis ([email protected])
  8. // Martin Willemoes Hansen ([email protected])
  9. //
  10. // (c) 2002 Dan Lewis
  11. // (c) 2003 Martin Willemoes Hansen
  12. using System;
  13. using System.Text.RegularExpressions;
  14. using NUnit.Framework;
  15. namespace MonoTests.System.Text.RegularExpressions {
  16. [TestFixture]
  17. public class PerlTest {
  18. [Test]
  19. public void Trials () {
  20. foreach (RegexTrial trial in PerlTrials.trials) {
  21. string actual = trial.Execute ();
  22. if (actual != trial.Expected) {
  23. Assertion.Fail (
  24. trial.ToString () +
  25. "Expected " + trial.Expected +
  26. " but got " + actual
  27. );
  28. }
  29. }
  30. }
  31. }
  32. }