os/ossrv/genericservices/httputils/Test/t_uriparser/DelimitedPathTests.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __DELIMITEDPATHTESTS_H__
    17 #define __DELIMITEDPATHTESTS_H__
    18 
    19 // System includes
    20 //
    21 #include <e32base.h>
    22 
    23 //
    24 //
    25 // DelmiitedPath test data
    26 //
    27 //
    28 
    29 _LIT(KPathParse0,		"/a/bc/def/ghij/");
    30 _LIT(KPathParse0Seg0,	"a");
    31 _LIT(KPathParse0Seg1,	"bc");
    32 _LIT(KPathParse0Seg2,	"def");
    33 _LIT(KPathParse0Seg3,	"ghij");
    34 _LIT(KPathParse0Seg4,	"");
    35 
    36 _LIT(KPathParse1,		"/hello:there;p1;p2;p3/index.wml");
    37 _LIT(KPathParse1Seg0,	"hello:there;p1;p2;p3");
    38 _LIT(KPathParse1Seg1,	"index.wml");
    39 
    40 _LIT(KPathParse2,		"/hello/there;p1;p2;p3/is/there/any/filename/");
    41 _LIT(KPathParse2Seg0,	"hello");
    42 _LIT(KPathParse2Seg1,	"there;p1;p2;p3");
    43 _LIT(KPathParse2Seg2,	"is");
    44 _LIT(KPathParse2Seg3,	"there");
    45 _LIT(KPathParse2Seg4,	"any");
    46 _LIT(KPathParse2Seg5,	"filename");
    47 _LIT(KPathParse2Seg6,	"");
    48 
    49 _LIT(KPath_DelimPresence0, "/afrontdelim/abackdelim/");
    50 TBool KPath_FrontDelim0 = ETrue;
    51 TBool KPath_BackDelim0 = ETrue;
    52 
    53 _LIT(KPath_DelimPresence1, "nofrontdelim/abackdelim/");
    54 TBool KPath_FrontDelim1 = EFalse;
    55 TBool KPath_BackDelim1 = ETrue;
    56 
    57 _LIT(KPath_DelimPresence2, "/afrontdelim/nobackdelim");
    58 TBool KPath_FrontDelim2 = ETrue;
    59 TBool KPath_BackDelim2 = EFalse;
    60 
    61 _LIT(KPath_DelimPresence3, "nofrontdelim/nobackdelim");
    62 TBool KPath_FrontDelim3 = EFalse;
    63 TBool KPath_BackDelim3 = EFalse;
    64 
    65 _LIT(KPath_Rem_Forwards0_0, "/a/bc/def/ghikj/");
    66 _LIT(KPath_Rem_Forwards0_1, "/bc/def/ghikj/");
    67 _LIT(KPath_Rem_Forwards0_2, "/def/ghikj/");
    68 _LIT(KPath_Rem_Forwards0_3, "/ghikj/");
    69 _LIT(KPath_Rem_Forwards0_4, "/");
    70 
    71 _LIT(KPath_Rem_Forwards1_0, "/a/bc/def/ghikj");
    72 _LIT(KPath_Rem_Forwards1_1, "/bc/def/ghikj");
    73 _LIT(KPath_Rem_Forwards1_2, "/def/ghikj");
    74 _LIT(KPath_Rem_Forwards1_3, "/ghikj");
    75 
    76 _LIT(KPath_Rem_Forwards2_0, "a/bc/def/ghikj");
    77 _LIT(KPath_Rem_Forwards2_1, "/bc/def/ghikj");
    78 _LIT(KPath_Rem_Forwards2_2, "/def/ghikj");
    79 _LIT(KPath_Rem_Forwards2_3, "/ghikj");
    80 
    81 _LIT(KPath_Rem_Backwards0_0, "/a/bc/def/ghikj/");
    82 _LIT(KPath_Rem_Backwards0_1, "/a/bc/def/ghikj");
    83 _LIT(KPath_Rem_Backwards0_2, "/a/bc/def");
    84 _LIT(KPath_Rem_Backwards0_3, "/a/bc");
    85 _LIT(KPath_Rem_Backwards0_4, "/a");
    86 
    87 _LIT(KPath_Rem_Backwards1_0, "/a/bc/def/ghikj");
    88 _LIT(KPath_Rem_Backwards1_1, "/a/bc/def");
    89 _LIT(KPath_Rem_Backwards1_2, "/a/bc");
    90 _LIT(KPath_Rem_Backwards1_3, "/a");
    91 
    92 _LIT(KPath_Rem_Backwards2_0, "a/bc/def/ghikj");
    93 _LIT(KPath_Rem_Backwards2_1, "a/bc/def");
    94 _LIT(KPath_Rem_Backwards2_2, "a/bc");
    95 _LIT(KPath_Rem_Backwards2_3, "a");
    96 
    97 _LIT(KPath_Des0, "/a/bc/def/ghij/");
    98 
    99 _LIT(KPath_PushPopFront0_0, "");
   100 _LIT(KPath_PushPopFront0_1, "/zero");
   101 _LIT(KPath_PushPopFront0_2, "/one/zero");
   102 _LIT(KPath_PushPopFront0_3, "/two/one/zero");
   103 _LIT(KPath_PushPopFront0_4, "/three/two/one/zero");
   104 _LIT(KPath_PushPopFront0_5, "/four/three/two/one/zero");
   105 
   106 _LIT(KPath_PushPopBack0_0, "");
   107 _LIT(KPath_PushPopBack0_1, "/zero");
   108 _LIT(KPath_PushPopBack0_2, "/zero/one");
   109 _LIT(KPath_PushPopBack0_3, "/zero/one/two");
   110 _LIT(KPath_PushPopBack0_4, "/zero/one/two/three");
   111 _LIT(KPath_PushPopBack0_5, "/zero/one/two/three/four");
   112 
   113 _LIT(KPath_Push0_a, "zero");
   114 _LIT(KPath_Push0_b, "one");
   115 _LIT(KPath_Push0_c, "two");
   116 _LIT(KPath_Push0_d, "three");
   117 _LIT(KPath_Push0_e, "four");
   118 
   119 _LIT(KPath_AddTrimDelim0, "zero/one/two/three/four");
   120 
   121 _LIT(KPath_InsertBackwards0_0, "/some/rubbish/before/some/rubbish/after");
   122 _LIT(KPath_InsertBackwards0_1, "/some/rubbish/before/zero/some/rubbish/after");
   123 _LIT(KPath_InsertBackwards0_2, "/some/rubbish/before/one/zero/some/rubbish/after");
   124 _LIT(KPath_InsertBackwards0_3, "/some/rubbish/before/two/one/zero/some/rubbish/after");
   125 _LIT(KPath_InsertBackwards0_4, "/some/rubbish/before/three/two/one/zero/some/rubbish/after");
   126 _LIT(KPath_InsertBackwards0_5, "/some/rubbish/before/four/three/two/one/zero/some/rubbish/after");
   127 const TInt KPathInsertBackwardsPos0 = 3;
   128 
   129 _LIT(KPath_RemoveBackwards0_5, "/some/rubbish/before/some/rubbish/after");
   130 _LIT(KPath_RemoveBackwards0_4, "/some/rubbish/before/zero/some/rubbish/after");
   131 _LIT(KPath_RemoveBackwards0_3, "/some/rubbish/before/zero/one/some/rubbish/after");
   132 _LIT(KPath_RemoveBackwards0_2, "/some/rubbish/before/zero/one/two/some/rubbish/after");
   133 _LIT(KPath_RemoveBackwards0_1, "/some/rubbish/before/zero/one/two/three/some/rubbish/after");
   134 _LIT(KPath_RemoveBackwards0_0, "/some/rubbish/before/zero/one/two/three/four/some/rubbish/after");
   135 const TInt KPathRemoveBackwardsPos0 = 3;
   136 
   137 _LIT(KPath_InsertForwards0_0, "/some/rubbish/before/some/rubbish/after");
   138 _LIT(KPath_InsertForwards0_1, "/some/rubbish/before/zero/some/rubbish/after");
   139 _LIT(KPath_InsertForwards0_2, "/some/rubbish/before/zero/one/some/rubbish/after");
   140 _LIT(KPath_InsertForwards0_3, "/some/rubbish/before/zero/one/two/some/rubbish/after");
   141 _LIT(KPath_InsertForwards0_4, "/some/rubbish/before/zero/one/two/three/some/rubbish/after");
   142 _LIT(KPath_InsertForwards0_5, "/some/rubbish/before/zero/one/two/three/four/some/rubbish/after");
   143 const TInt KPathInsertForwardsPos0 = 3;
   144 
   145 _LIT(KPath_RemoveForwards0_5, "/some/rubbish/before/some/rubbish/after");
   146 _LIT(KPath_RemoveForwards0_4, "/some/rubbish/before/zero/some/rubbish/after");
   147 _LIT(KPath_RemoveForwards0_3, "/some/rubbish/before/one/zero/some/rubbish/after");
   148 _LIT(KPath_RemoveForwards0_2, "/some/rubbish/before/two/one/zero/some/rubbish/after");
   149 _LIT(KPath_RemoveForwards0_1, "/some/rubbish/before/three/two/one/zero/some/rubbish/after");
   150 _LIT(KPath_RemoveForwards0_0, "/some/rubbish/before/four/three/two/one/zero/some/rubbish/after");
   151 const TInt KPathRemoveForwardsPos0 = 3;
   152 
   153 _LIT(KPath_Insert0_a, "zero");
   154 _LIT(KPath_Insert0_b, "one");
   155 _LIT(KPath_Insert0_c, "two");
   156 _LIT(KPath_Insert0_d, "three");
   157 _LIT(KPath_Insert0_e, "four");
   158 
   159 _LIT(KPath_InsertEscapeBackwards0_0, "/some/rubbish/before/some/rubbish/after");
   160 _LIT(KPath_InsertEscapeBackwards0_1, "/some/rubbish/before/a%2Fa/some/rubbish/after");
   161 _LIT(KPath_InsertEscapeBackwards0_2, "/some/rubbish/before/a%3Ba/a%2Fa/some/rubbish/after");
   162 _LIT(KPath_InsertEscapeBackwards0_3, "/some/rubbish/before/a%3Da/a%3Ba/a%2Fa/some/rubbish/after");
   163 _LIT(KPath_InsertEscapeBackwards0_4, "/some/rubbish/before/a%3Fa/a%3Da/a%3Ba/a%2Fa/some/rubbish/after");
   164 _LIT(KPath_InsertEscapeBackwards0_5, "/some/rubbish/before/a%20a/a%3Fa/a%3Da/a%3Ba/a%2Fa/some/rubbish/after");
   165 const TInt KPathInsertEscapeBackwardsPos0 = 3;
   166 
   167 _LIT(KPath_InsertEscapeForwards0_0, "/some/rubbish/before/some/rubbish/after");
   168 _LIT(KPath_InsertEscapeForwards0_1, "/some/rubbish/before/a%2Fa/some/rubbish/after");
   169 _LIT(KPath_InsertEscapeForwards0_2, "/some/rubbish/before/a%2Fa/a%3Ba/some/rubbish/after");
   170 _LIT(KPath_InsertEscapeForwards0_3, "/some/rubbish/before/a%2Fa/a%3Ba/a%3Da/some/rubbish/after");
   171 _LIT(KPath_InsertEscapeForwards0_4, "/some/rubbish/before/a%2Fa/a%3Ba/a%3Da/a%3Fa/some/rubbish/after");
   172 _LIT(KPath_InsertEscapeForwards0_5, "/some/rubbish/before/a%2Fa/a%3Ba/a%3Da/a%3Fa/a%20a/some/rubbish/after");
   173 const TInt KPathInsertEscapeForwardsPos0 = 3;
   174 
   175 _LIT(KPath_InsertEscape0_a, "a/a");
   176 _LIT(KPath_InsertEscape0_b, "a;a");
   177 _LIT(KPath_InsertEscape0_c, "a=a");
   178 _LIT(KPath_InsertEscape0_d, "a?a");
   179 _LIT(KPath_InsertEscape0_e, "a a");
   180 
   181 _LIT(KPath_PushEscapeFront0_0, "");
   182 _LIT(KPath_PushEscapeFront0_1, "/a%2Fa");
   183 _LIT(KPath_PushEscapeFront0_2, "/a%3Ba/a%2Fa");
   184 _LIT(KPath_PushEscapeFront0_3, "/a%3Da/a%3Ba/a%2Fa");
   185 _LIT(KPath_PushEscapeFront0_4, "/a%3Fa/a%3Da/a%3Ba/a%2Fa");
   186 _LIT(KPath_PushEscapeFront0_5, "/a%20a/a%3Fa/a%3Da/a%3Ba/a%2Fa");
   187 
   188 _LIT(KPath_PushEscapeBack0_0, "");
   189 _LIT(KPath_PushEscapeBack0_1, "/a%2Fa");
   190 _LIT(KPath_PushEscapeBack0_2, "/a%2Fa/a%3Ba");
   191 _LIT(KPath_PushEscapeBack0_3, "/a%2Fa/a%3Ba/a%3Da");
   192 _LIT(KPath_PushEscapeBack0_4, "/a%2Fa/a%3Ba/a%3Da/a%3Fa");
   193 _LIT(KPath_PushEscapeBack0_5, "/a%2Fa/a%3Ba/a%3Da/a%3Fa/a%20a");
   194 
   195 _LIT(KPath_PushEscape0_a, "a/a");
   196 _LIT(KPath_PushEscape0_b, "a;a");
   197 _LIT(KPath_PushEscape0_c, "a=a");
   198 _LIT(KPath_PushEscape0_d, "a?a");
   199 _LIT(KPath_PushEscape0_e, "a a");
   200 
   201 #endif	// __DELIMITEDPATHTESTS_H__