juergen     2003/07/15 00:49:14

  Modified:    testsuite/testsuite/junit/xmltestcases/DeltaV/compatability/LockedVCR
                        Options.xml
               testsuite/testsuite/junit/xmltestcases/DeltaV/compatability/UnlockedVCR
                        Options.xml
               
testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Checkout-in-place_feature/Additional_Option_Semantics
                        Options.xml
               
testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Label_Feature/Additional_Option_Semantics
                        Options.xml
               
testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Version_control_features/Additional_Options_Semantics
                        Options.xml
               
testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Working_resource_feature/Additional_Option_Semantics
                        Options.xml
               
testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlExisitingMethods
                        OptionsAccess-ControlHeader.xml
               
testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Update/Additional_Option_Semantics
                        OptionsUpdte.xml
               
testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Version_history_feature/Additional_options_semantics
                        OptionsVH.xml
               
testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Workspace_Feature/Additional_Options_semantics
                        OptionsWs.xml
               
testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor
                        TProcessors.java
  Log:
  t-processor will support wildcard ("*") at the "DAV" and the "Allow" header. This 
will allow an easier add of new features (e.g. BIND) without the need of modifying 
existing test cases.
  
  Example:
  
                        <header>Allow: *, COPY, POST, VERSION-CONTROL, LOCK, REPORT, 
PROPPATCH, TRACE, PUT, PROPFIND, HEAD, UNLOCK, CONNECT, OPTIONS, UPDATE, DELETE, 
CHECKOUT, MOVE, GET</header>
  
                        <header>DAV: *, version-control, version-history, 
checkout-in-place, workspace, working-resource, update, label</header>
  
  Revision  Changes    Path
  1.5       +1 -1      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/compatability/LockedVCR/Options.xml
  
  Index: Options.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/compatability/LockedVCR/Options.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Options.xml       17 Feb 2003 17:59:53 -0000      1.4
  +++ Options.xml       15 Jul 2003 07:49:12 -0000      1.5
  @@ -45,7 +45,7 @@
       </request>
       <response>
         <command>HTTP/1.0 200 OK</command>
  -      <header>DAV: 1, 2, slide, access-control, version-control, version-history, 
checkout-in-place, workspace, working-resource, update, label</header>
  +      <header>DAV: *, version-control, version-history, checkout-in-place, 
workspace, working-resource, update, label</header>
       </response>
     </step>
     <cleanup>
  
  
  
  1.3       +1 -1      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/compatability/UnlockedVCR/Options.xml
  
  Index: Options.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/compatability/UnlockedVCR/Options.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Options.xml       2 Aug 2002 08:37:12 -0000       1.2
  +++ Options.xml       15 Jul 2003 07:49:12 -0000      1.3
  @@ -33,7 +33,7 @@
                </request>
                <response>
                        <command>HTTP/1.0 200 OK</command>
  -                     <header>DAV: 1, 2, slide, access-control, version-control, 
version-history, checkout-in-place, workspace, working-resource, update, label</header>
  +                     <header>DAV: *, version-control, version-history, 
checkout-in-place, workspace, working-resource, update, label</header>
                </response>
        </step>
        <cleanup>
  
  
  
  1.5       +1 -1      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Checkout-in-place_feature/Additional_Option_Semantics/Options.xml
  
  Index: Options.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Checkout-in-place_feature/Additional_Option_Semantics/Options.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Options.xml       2 Aug 2002 06:52:40 -0000       1.4
  +++ Options.xml       15 Jul 2003 07:49:12 -0000      1.5
  @@ -33,7 +33,7 @@
                </request>
                <response>
                        <command>HTTP/1.0 200 OK</command>
  -                     <header>DAV: 1, 2, slide, access-control, version-control, 
version-history, checkout-in-place, workspace, working-resource, update, label</header>
  +                     <header>DAV: *, version-control, version-history, 
checkout-in-place, workspace, working-resource, update, label</header>
                </response>
        </step>
        <cleanup>
  
  
  
  1.8       +1 -1      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Label_Feature/Additional_Option_Semantics/Options.xml
  
  Index: Options.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Label_Feature/Additional_Option_Semantics/Options.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Options.xml       1 Nov 2002 13:12:38 -0000       1.7
  +++ Options.xml       15 Jul 2003 07:49:12 -0000      1.8
  @@ -33,7 +33,7 @@
                </request>
                <response>
                        <command>HTTP/1.0 200 OK</command>
  -                     <header>Allow: COPY, POST, ACL, VERSION-CONTROL, LOCK, REPORT, 
PROPPATCH, TRACE, PUT, PROPFIND, HEAD, UNLOCK, CONNECT, OPTIONS, UPDATE, DELETE, 
CHECKOUT, SEARCH, MOVE, GET</header>
  +                     <header>Allow: *, COPY, POST, VERSION-CONTROL, LOCK, REPORT, 
PROPPATCH, TRACE, PUT, PROPFIND, HEAD, UNLOCK, CONNECT, OPTIONS, UPDATE, DELETE, 
CHECKOUT, MOVE, GET</header>
                </response>
        </step>
        <cleanup>
  
  
  
  1.6       +1 -1      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Version_control_features/Additional_Options_Semantics/Options.xml
  
  Index: Options.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Version_control_features/Additional_Options_Semantics/Options.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Options.xml       2 Aug 2002 08:37:12 -0000       1.5
  +++ Options.xml       15 Jul 2003 07:49:12 -0000      1.6
  @@ -33,7 +33,7 @@
                </request>
                <response>
                        <command>HTTP/1.0 200 OK</command>
  -                     <header>DAV: 1, 2, slide, access-control, version-control, 
version-history, checkout-in-place, workspace, working-resource, update, label</header>
  +                     <header>DAV: *, version-control, version-history, 
checkout-in-place, workspace, working-resource, update, label</header>
                </response>
        </step>
        <cleanup>
  
  
  
  1.6       +1 -1      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Working_resource_feature/Additional_Option_Semantics/Options.xml
  
  Index: Options.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Working_resource_feature/Additional_Option_Semantics/Options.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Options.xml       2 Aug 2002 06:52:40 -0000       1.5
  +++ Options.xml       15 Jul 2003 07:49:13 -0000      1.6
  @@ -33,7 +33,7 @@
                </request>
                <response>
                        <command>HTTP/1.0 200 OK</command>
  -                     <header>DAV: 1, 2, slide, access-control, version-control, 
version-history, checkout-in-place, workspace, working-resource, update, label</header>
  +                     <header>DAV: *, version-control, version-history, 
checkout-in-place, workspace, working-resource, update, label</header>
                </response>
        </step>
        <cleanup>
  
  
  
  1.4       +1 -6      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlExisitingMethods/OptionsAccess-ControlHeader.xml
  
  Index: OptionsAccess-ControlHeader.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/AccessControlExisitingMethods/OptionsAccess-ControlHeader.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OptionsAccess-ControlHeader.xml   13 Aug 2002 09:29:46 -0000      1.3
  +++ OptionsAccess-ControlHeader.xml   15 Jul 2003 07:49:13 -0000      1.4
  @@ -11,15 +11,10 @@
        <step>
                <request>
                        <command 
varUsage="globalVariableCollection,globalVariableServerName">OPTIONS  
/%globalVariableServerName%/%globalVariableCollection%/ HTTP/1.1</command>
  -                     <header>User-Agent: Microsoft Data Access Internet Publishing 
Provider DAV</header>
  -                     <header>Accept-Language: en-us</header>
  -                     <header>Connection: Keep-Alive</header>
  -                     <header>Translate: f</header>
  -                     <body/>
                </request>
                <response>
                        <command>HTTP/1.1 200 OK</command>
  -                     <header>DAV: 1, 2, slide, access-control, version-control, 
version-history, checkout-in-place, workspace, working-resource, update, label</header>
  +                     <header>DAV: *, access-control</header>
                        <body/>
                </response>
        </step>
  
  
  
  1.3       +1 -1      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Update/Additional_Option_Semantics/OptionsUpdte.xml
  
  Index: OptionsUpdte.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Update/Additional_Option_Semantics/OptionsUpdte.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OptionsUpdte.xml  2 Aug 2002 08:37:12 -0000       1.2
  +++ OptionsUpdte.xml  15 Jul 2003 07:49:13 -0000      1.3
  @@ -15,7 +15,7 @@
                </request>
                <response>
                        <command>HTTP/1.1 200 OK</command>
  -                     <header>DAV: 1, 2, slide, access-control, version-control, 
version-history, checkout-in-place, workspace, working-resource, update, label</header>
  +                     <header>DAV: *, version-control, version-history, 
checkout-in-place, workspace, working-resource, update, label</header>
                        <body/>
                </response>
        </step>
  
  
  
  1.3       +1 -1      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Version_history_feature/Additional_options_semantics/OptionsVH.xml
  
  Index: OptionsVH.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Version_history_feature/Additional_options_semantics/OptionsVH.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OptionsVH.xml     2 Aug 2002 08:37:12 -0000       1.2
  +++ OptionsVH.xml     15 Jul 2003 07:49:13 -0000      1.3
  @@ -15,7 +15,7 @@
                </request>
                <response>
                        <command>HTTP/1.1 200 OK</command>
  -                     <header>DAV: 1, 2, slide, access-control, version-control, 
version-history, checkout-in-place, workspace, working-resource, update, label</header>
  +                     <header>DAV: *, version-control, version-history, 
checkout-in-place, workspace, working-resource, update, label</header>
                        <body/>
                </response>
        </step>
  
  
  
  1.3       +1 -1      
jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Workspace_Feature/Additional_Options_semantics/OptionsWs.xml
  
  Index: OptionsWs.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/xmltestcases/DeltaV/functional/Workspace_Feature/Additional_Options_semantics/OptionsWs.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OptionsWs.xml     2 Aug 2002 08:37:12 -0000       1.2
  +++ OptionsWs.xml     15 Jul 2003 07:49:13 -0000      1.3
  @@ -15,7 +15,7 @@
                </request>
                <response>
                        <command>HTTP/1.1 200 OK</command>
  -                     <header>DAV: 1, 2, slide, access-control, version-control, 
version-history, checkout-in-place, workspace, working-resource, update, label</header>
  +                     <header>DAV: *, version-control, version-history, 
checkout-in-place, workspace, working-resource, update, label</header>
                        <body/>
                </response>
        </step>
  
  
  
  1.59      +17 -9     
jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/TProcessors.java
  
  Index: TProcessors.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/TProcessors.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- TProcessors.java  14 Jul 2003 14:25:58 -0000      1.58
  +++ TProcessors.java  15 Jul 2003 07:49:13 -0000      1.59
  @@ -1228,8 +1228,8 @@
   
       private boolean  compareOneHeader(Header expected, Header received){
           boolean result = false;
  -        if (expected.getName().equals("Allow")) {
  -            result = compareAllowHeader(expected, received);
  +        if (expected.getName().equals("Allow") || expected.getName().equals("DAV")) 
{
  +            result = compareCommaSeperatedListHeader(expected, received);
           } else {
               result = received.getValue().equalsIgnoreCase(expected.getValue());
           }
  @@ -1238,11 +1238,18 @@
   
   
   
  -    private boolean  compareAllowHeader(Header expected, Header received){
  +    private boolean  compareCommaSeperatedListHeader(Header expected, Header 
received){
           boolean result = false;
           HashSet expList = tokeniseCommaList(expected.getValue());
           HashSet recList = tokeniseCommaList(received.getValue());
  -        result = expList.equals(expList);
  +        if (!expList.contains("*")) {
  +            // no wildcard ==> lists must be identical
  +            result = expList.equals(recList);
  +        } else {
  +            // wildcard ==> expected must be completely contained in received
  +            expList.remove("*");
  +            result = recList.containsAll(expList);
  +        }
           return result;
       }
   
  @@ -1251,7 +1258,7 @@
           StringTokenizer iter = new StringTokenizer(value, ",");
           while (iter.hasMoreElements())
           {
  -            String element = (String)iter.nextElement();
  +            String element = ((String)iter.nextElement()).trim();
               result.add(element);
           }
           return result;
  @@ -1873,6 +1880,7 @@
   
       }
   }
  +
   
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to