2002/css-validator/autotest AutoTestContentHandler.java,1.3,1.4 README,1.3,1.4

Update of /sources/public/2002/css-validator/autotest
In directory hutz:/tmp/cvs-serv333

Modified Files:
	AutoTestContentHandler.java README 
Log Message:
making the parameter for test cases to set the requested level of warnings
consistent with the actual validator parameter.
(using warning= everywhere)



Index: README
===================================================================
RCS file: /sources/public/2002/css-validator/autotest/README,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- README	29 Aug 2006 02:46:33 -0000	1.3
+++ README	7 Mar 2008 15:56:31 -0000	1.4
@@ -44,7 +44,7 @@
 
     <test profile="css1"> ...</test>
     <test medium="print,screen">...</test>
-    <test warnings="2"> ...</test>
+    <test warning="2"> ...</test>
 
 ================================================================================
 FRENCH
@@ -84,7 +84,7 @@
 	is used as the UA default.
       </description>
  
-L'element <test> peut prendre plusieurs parametres (profile, medium et warnings)
+L'element <test> peut prendre plusieurs parametres (profile, medium et warning)
 dont les valeurs sont equivalentes a celles du service de validation (Cf. manuel
 du validateur pour les valeurs acceptées).
 
@@ -92,6 +92,6 @@
 
     <test profile="css1"> ...</test>
     <test medium="print,screen">...</test>
-    <test warnings="2"> ...</test>
+    <test warning="2"> ...</test>
 
    </test>

Index: AutoTestContentHandler.java
===================================================================
RCS file: /sources/public/2002/css-validator/autotest/AutoTestContentHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- AutoTestContentHandler.java	6 Aug 2007 13:36:21 -0000	1.3
+++ AutoTestContentHandler.java	7 Mar 2008 15:56:31 -0000	1.4
@@ -66,7 +66,7 @@
 	Result awaitedResult = new Result();
 	Result result = new Result();
 	String profile;
-	String warnings;
+	String warning;
 	String medium;
 	
 	/**
@@ -185,13 +185,13 @@
 			desc = "";
 			result = new Result();
 
-			warnings = null;
+			warning = null;
 			profile = null;
 			medium = null;
 			for (int i = 0; i < attributs.getLength(); i++) {
 				String currentAttr = attributs.getLocalName(i);
-				if (currentAttr.equals("warnings")) {
-					warnings = attributs.getValue(i);
+				if (currentAttr.equals("warning")) {
+					warning = attributs.getValue(i);
 				} else if (currentAttr.equals("profile")) {
 					profile = attributs.getValue(i);
 				} else if (currentAttr.equals("medium")) {
@@ -277,8 +277,8 @@
 				val = VALIDATOR + "uri=" + validURL;
 			}
 
-			if (warnings != null) {
-				val += "&warning=" + warnings;
+			if (warning != null) {
+				val += "&warning=" + warning;
 			}
 			if (profile != null) {
 				val += "&profile=" + profile;
@@ -381,7 +381,7 @@
 		} else if (inWarnings) {
 			int warnings;
 			try {
-				warnings = Integer.parseInt(new String(ch, start, end));
+				warnings= Integer.parseInt(new String(ch, start, end));
 			} catch (NumberFormatException e) {
 				warnings = 0;
 			}

Received on Friday, 7 March 2008 15:56:46 UTC