Author: atsushi
Date: 2005-04-11 06:01:16 -0400 (Mon, 11 Apr 2005)
New Revision: 42779

Modified:
   trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/ChangeLog
   trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/Makefile
   
trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/anglia-test-runner.cs
Log:
2005-04-11  Atsushi Enomoto <[EMAIL PROTECTED]>

        * anglia-test-runner.cs : added some options.
        * Makefile : clean is inconsistent.



Modified: trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/ChangeLog
===================================================================
--- trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/ChangeLog 
2005-04-11 09:37:04 UTC (rev 42778)
+++ trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/ChangeLog 
2005-04-11 10:01:16 UTC (rev 42779)
@@ -1,3 +1,8 @@
+2005-04-11  Atsushi Enomoto <[EMAIL PROTECTED]>
+
+       * anglia-test-runner.cs : added some options.
+       * Makefile : clean is inconsistent.
+
 2004-06-17  Atsushi Enomoto <[EMAIL PROTECTED]>
 
        * relaxngtest.cs : Now we can test all cases (though resulting in 

Modified: trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/Makefile
===================================================================
--- trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/Makefile  
2005-04-11 09:37:04 UTC (rev 42778)
+++ trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/Makefile  
2005-04-11 10:01:16 UTC (rev 42779)
@@ -40,5 +40,6 @@
        $(RUNTIME) anglia-test-runner.exe
 
 # be careful to use it. This removes ALL files in xml-test-suite!
-# clean:
+clean :
 #      rm -rf xml-test-suite
+       rm relaxngtest.exe anglia-test-runner.exe

Modified: 
trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/anglia-test-runner.cs
===================================================================
--- 
trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/anglia-test-runner.cs 
    2005-04-11 09:37:04 UTC (rev 42778)
+++ 
trunk/mcs/class/Commons.Xml.Relaxng/Test/standalone_tests/anglia-test-runner.cs 
    2005-04-11 10:01:16 UTC (rev 42779)
@@ -6,8 +6,25 @@
 
 public class Driver
 {
-       public static void Main ()
+       public static void Main (string [] args)
        {
+               bool outAll = false;
+               bool details = false;
+               bool stopOnError = false;
+               string filter = null;
+               foreach (string arg in args) {
+                       switch (arg) {
+                       case "--outall":
+                               outAll = true; break;
+                       case "--details":
+                               details = true; break;
+                       case "--stoponerror":
+                               stopOnError = true; break;
+                       default:
+                               filter = arg; break;
+                       }
+               }
+
                try {
                        XmlDocument doc = new XmlDocument ();
                        doc.Load ("test/RNCTest.xml");
@@ -15,6 +32,10 @@
                        int failure = 0;
                        foreach (XmlElement el in doc.SelectNodes 
("/RNCTestCases/TestCase")) {
                                string id = el.GetAttribute ("id");
+                               if (filter != null && id.IndexOf (filter) < 0)
+                                       continue;
+                               if (outAll)
+                                       Console.WriteLine ("testing " + id);
                                bool isValid = el.GetAttribute ("legal") == 
"true";
                                RncParser p = new RncParser (new NameTable ());
                                try {
@@ -29,8 +50,10 @@
                                        }
                                } catch (Exception ex) {
                                        if (isValid) {
+                                               if (stopOnError)
+                                                       throw;
                                                failure++;
-                                               Console.Error.WriteLine 
("INCORRECTLY INVALID " + id + " --> " + ex.Message);
+                                               Console.Error.WriteLine 
("INCORRECTLY INVALID " + id + " --> " + (details ? ex.ToString () : 
ex.Message));
                                        } else {
                                                success++;
 //                                             Console.Error.WriteLine 
("invalid " + id);

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

Reply via email to