os/ossrv/genericservices/httputils/Test/t_uriparser/DelimitedPathTests.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericservices/httputils/Test/t_uriparser/DelimitedPathTests.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,201 @@
     1.4 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __DELIMITEDPATHTESTS_H__
    1.20 +#define __DELIMITEDPATHTESTS_H__
    1.21 +
    1.22 +// System includes
    1.23 +//
    1.24 +#include <e32base.h>
    1.25 +
    1.26 +//
    1.27 +//
    1.28 +// DelmiitedPath test data
    1.29 +//
    1.30 +//
    1.31 +
    1.32 +_LIT(KPathParse0,		"/a/bc/def/ghij/");
    1.33 +_LIT(KPathParse0Seg0,	"a");
    1.34 +_LIT(KPathParse0Seg1,	"bc");
    1.35 +_LIT(KPathParse0Seg2,	"def");
    1.36 +_LIT(KPathParse0Seg3,	"ghij");
    1.37 +_LIT(KPathParse0Seg4,	"");
    1.38 +
    1.39 +_LIT(KPathParse1,		"/hello:there;p1;p2;p3/index.wml");
    1.40 +_LIT(KPathParse1Seg0,	"hello:there;p1;p2;p3");
    1.41 +_LIT(KPathParse1Seg1,	"index.wml");
    1.42 +
    1.43 +_LIT(KPathParse2,		"/hello/there;p1;p2;p3/is/there/any/filename/");
    1.44 +_LIT(KPathParse2Seg0,	"hello");
    1.45 +_LIT(KPathParse2Seg1,	"there;p1;p2;p3");
    1.46 +_LIT(KPathParse2Seg2,	"is");
    1.47 +_LIT(KPathParse2Seg3,	"there");
    1.48 +_LIT(KPathParse2Seg4,	"any");
    1.49 +_LIT(KPathParse2Seg5,	"filename");
    1.50 +_LIT(KPathParse2Seg6,	"");
    1.51 +
    1.52 +_LIT(KPath_DelimPresence0, "/afrontdelim/abackdelim/");
    1.53 +TBool KPath_FrontDelim0 = ETrue;
    1.54 +TBool KPath_BackDelim0 = ETrue;
    1.55 +
    1.56 +_LIT(KPath_DelimPresence1, "nofrontdelim/abackdelim/");
    1.57 +TBool KPath_FrontDelim1 = EFalse;
    1.58 +TBool KPath_BackDelim1 = ETrue;
    1.59 +
    1.60 +_LIT(KPath_DelimPresence2, "/afrontdelim/nobackdelim");
    1.61 +TBool KPath_FrontDelim2 = ETrue;
    1.62 +TBool KPath_BackDelim2 = EFalse;
    1.63 +
    1.64 +_LIT(KPath_DelimPresence3, "nofrontdelim/nobackdelim");
    1.65 +TBool KPath_FrontDelim3 = EFalse;
    1.66 +TBool KPath_BackDelim3 = EFalse;
    1.67 +
    1.68 +_LIT(KPath_Rem_Forwards0_0, "/a/bc/def/ghikj/");
    1.69 +_LIT(KPath_Rem_Forwards0_1, "/bc/def/ghikj/");
    1.70 +_LIT(KPath_Rem_Forwards0_2, "/def/ghikj/");
    1.71 +_LIT(KPath_Rem_Forwards0_3, "/ghikj/");
    1.72 +_LIT(KPath_Rem_Forwards0_4, "/");
    1.73 +
    1.74 +_LIT(KPath_Rem_Forwards1_0, "/a/bc/def/ghikj");
    1.75 +_LIT(KPath_Rem_Forwards1_1, "/bc/def/ghikj");
    1.76 +_LIT(KPath_Rem_Forwards1_2, "/def/ghikj");
    1.77 +_LIT(KPath_Rem_Forwards1_3, "/ghikj");
    1.78 +
    1.79 +_LIT(KPath_Rem_Forwards2_0, "a/bc/def/ghikj");
    1.80 +_LIT(KPath_Rem_Forwards2_1, "/bc/def/ghikj");
    1.81 +_LIT(KPath_Rem_Forwards2_2, "/def/ghikj");
    1.82 +_LIT(KPath_Rem_Forwards2_3, "/ghikj");
    1.83 +
    1.84 +_LIT(KPath_Rem_Backwards0_0, "/a/bc/def/ghikj/");
    1.85 +_LIT(KPath_Rem_Backwards0_1, "/a/bc/def/ghikj");
    1.86 +_LIT(KPath_Rem_Backwards0_2, "/a/bc/def");
    1.87 +_LIT(KPath_Rem_Backwards0_3, "/a/bc");
    1.88 +_LIT(KPath_Rem_Backwards0_4, "/a");
    1.89 +
    1.90 +_LIT(KPath_Rem_Backwards1_0, "/a/bc/def/ghikj");
    1.91 +_LIT(KPath_Rem_Backwards1_1, "/a/bc/def");
    1.92 +_LIT(KPath_Rem_Backwards1_2, "/a/bc");
    1.93 +_LIT(KPath_Rem_Backwards1_3, "/a");
    1.94 +
    1.95 +_LIT(KPath_Rem_Backwards2_0, "a/bc/def/ghikj");
    1.96 +_LIT(KPath_Rem_Backwards2_1, "a/bc/def");
    1.97 +_LIT(KPath_Rem_Backwards2_2, "a/bc");
    1.98 +_LIT(KPath_Rem_Backwards2_3, "a");
    1.99 +
   1.100 +_LIT(KPath_Des0, "/a/bc/def/ghij/");
   1.101 +
   1.102 +_LIT(KPath_PushPopFront0_0, "");
   1.103 +_LIT(KPath_PushPopFront0_1, "/zero");
   1.104 +_LIT(KPath_PushPopFront0_2, "/one/zero");
   1.105 +_LIT(KPath_PushPopFront0_3, "/two/one/zero");
   1.106 +_LIT(KPath_PushPopFront0_4, "/three/two/one/zero");
   1.107 +_LIT(KPath_PushPopFront0_5, "/four/three/two/one/zero");
   1.108 +
   1.109 +_LIT(KPath_PushPopBack0_0, "");
   1.110 +_LIT(KPath_PushPopBack0_1, "/zero");
   1.111 +_LIT(KPath_PushPopBack0_2, "/zero/one");
   1.112 +_LIT(KPath_PushPopBack0_3, "/zero/one/two");
   1.113 +_LIT(KPath_PushPopBack0_4, "/zero/one/two/three");
   1.114 +_LIT(KPath_PushPopBack0_5, "/zero/one/two/three/four");
   1.115 +
   1.116 +_LIT(KPath_Push0_a, "zero");
   1.117 +_LIT(KPath_Push0_b, "one");
   1.118 +_LIT(KPath_Push0_c, "two");
   1.119 +_LIT(KPath_Push0_d, "three");
   1.120 +_LIT(KPath_Push0_e, "four");
   1.121 +
   1.122 +_LIT(KPath_AddTrimDelim0, "zero/one/two/three/four");
   1.123 +
   1.124 +_LIT(KPath_InsertBackwards0_0, "/some/rubbish/before/some/rubbish/after");
   1.125 +_LIT(KPath_InsertBackwards0_1, "/some/rubbish/before/zero/some/rubbish/after");
   1.126 +_LIT(KPath_InsertBackwards0_2, "/some/rubbish/before/one/zero/some/rubbish/after");
   1.127 +_LIT(KPath_InsertBackwards0_3, "/some/rubbish/before/two/one/zero/some/rubbish/after");
   1.128 +_LIT(KPath_InsertBackwards0_4, "/some/rubbish/before/three/two/one/zero/some/rubbish/after");
   1.129 +_LIT(KPath_InsertBackwards0_5, "/some/rubbish/before/four/three/two/one/zero/some/rubbish/after");
   1.130 +const TInt KPathInsertBackwardsPos0 = 3;
   1.131 +
   1.132 +_LIT(KPath_RemoveBackwards0_5, "/some/rubbish/before/some/rubbish/after");
   1.133 +_LIT(KPath_RemoveBackwards0_4, "/some/rubbish/before/zero/some/rubbish/after");
   1.134 +_LIT(KPath_RemoveBackwards0_3, "/some/rubbish/before/zero/one/some/rubbish/after");
   1.135 +_LIT(KPath_RemoveBackwards0_2, "/some/rubbish/before/zero/one/two/some/rubbish/after");
   1.136 +_LIT(KPath_RemoveBackwards0_1, "/some/rubbish/before/zero/one/two/three/some/rubbish/after");
   1.137 +_LIT(KPath_RemoveBackwards0_0, "/some/rubbish/before/zero/one/two/three/four/some/rubbish/after");
   1.138 +const TInt KPathRemoveBackwardsPos0 = 3;
   1.139 +
   1.140 +_LIT(KPath_InsertForwards0_0, "/some/rubbish/before/some/rubbish/after");
   1.141 +_LIT(KPath_InsertForwards0_1, "/some/rubbish/before/zero/some/rubbish/after");
   1.142 +_LIT(KPath_InsertForwards0_2, "/some/rubbish/before/zero/one/some/rubbish/after");
   1.143 +_LIT(KPath_InsertForwards0_3, "/some/rubbish/before/zero/one/two/some/rubbish/after");
   1.144 +_LIT(KPath_InsertForwards0_4, "/some/rubbish/before/zero/one/two/three/some/rubbish/after");
   1.145 +_LIT(KPath_InsertForwards0_5, "/some/rubbish/before/zero/one/two/three/four/some/rubbish/after");
   1.146 +const TInt KPathInsertForwardsPos0 = 3;
   1.147 +
   1.148 +_LIT(KPath_RemoveForwards0_5, "/some/rubbish/before/some/rubbish/after");
   1.149 +_LIT(KPath_RemoveForwards0_4, "/some/rubbish/before/zero/some/rubbish/after");
   1.150 +_LIT(KPath_RemoveForwards0_3, "/some/rubbish/before/one/zero/some/rubbish/after");
   1.151 +_LIT(KPath_RemoveForwards0_2, "/some/rubbish/before/two/one/zero/some/rubbish/after");
   1.152 +_LIT(KPath_RemoveForwards0_1, "/some/rubbish/before/three/two/one/zero/some/rubbish/after");
   1.153 +_LIT(KPath_RemoveForwards0_0, "/some/rubbish/before/four/three/two/one/zero/some/rubbish/after");
   1.154 +const TInt KPathRemoveForwardsPos0 = 3;
   1.155 +
   1.156 +_LIT(KPath_Insert0_a, "zero");
   1.157 +_LIT(KPath_Insert0_b, "one");
   1.158 +_LIT(KPath_Insert0_c, "two");
   1.159 +_LIT(KPath_Insert0_d, "three");
   1.160 +_LIT(KPath_Insert0_e, "four");
   1.161 +
   1.162 +_LIT(KPath_InsertEscapeBackwards0_0, "/some/rubbish/before/some/rubbish/after");
   1.163 +_LIT(KPath_InsertEscapeBackwards0_1, "/some/rubbish/before/a%2Fa/some/rubbish/after");
   1.164 +_LIT(KPath_InsertEscapeBackwards0_2, "/some/rubbish/before/a%3Ba/a%2Fa/some/rubbish/after");
   1.165 +_LIT(KPath_InsertEscapeBackwards0_3, "/some/rubbish/before/a%3Da/a%3Ba/a%2Fa/some/rubbish/after");
   1.166 +_LIT(KPath_InsertEscapeBackwards0_4, "/some/rubbish/before/a%3Fa/a%3Da/a%3Ba/a%2Fa/some/rubbish/after");
   1.167 +_LIT(KPath_InsertEscapeBackwards0_5, "/some/rubbish/before/a%20a/a%3Fa/a%3Da/a%3Ba/a%2Fa/some/rubbish/after");
   1.168 +const TInt KPathInsertEscapeBackwardsPos0 = 3;
   1.169 +
   1.170 +_LIT(KPath_InsertEscapeForwards0_0, "/some/rubbish/before/some/rubbish/after");
   1.171 +_LIT(KPath_InsertEscapeForwards0_1, "/some/rubbish/before/a%2Fa/some/rubbish/after");
   1.172 +_LIT(KPath_InsertEscapeForwards0_2, "/some/rubbish/before/a%2Fa/a%3Ba/some/rubbish/after");
   1.173 +_LIT(KPath_InsertEscapeForwards0_3, "/some/rubbish/before/a%2Fa/a%3Ba/a%3Da/some/rubbish/after");
   1.174 +_LIT(KPath_InsertEscapeForwards0_4, "/some/rubbish/before/a%2Fa/a%3Ba/a%3Da/a%3Fa/some/rubbish/after");
   1.175 +_LIT(KPath_InsertEscapeForwards0_5, "/some/rubbish/before/a%2Fa/a%3Ba/a%3Da/a%3Fa/a%20a/some/rubbish/after");
   1.176 +const TInt KPathInsertEscapeForwardsPos0 = 3;
   1.177 +
   1.178 +_LIT(KPath_InsertEscape0_a, "a/a");
   1.179 +_LIT(KPath_InsertEscape0_b, "a;a");
   1.180 +_LIT(KPath_InsertEscape0_c, "a=a");
   1.181 +_LIT(KPath_InsertEscape0_d, "a?a");
   1.182 +_LIT(KPath_InsertEscape0_e, "a a");
   1.183 +
   1.184 +_LIT(KPath_PushEscapeFront0_0, "");
   1.185 +_LIT(KPath_PushEscapeFront0_1, "/a%2Fa");
   1.186 +_LIT(KPath_PushEscapeFront0_2, "/a%3Ba/a%2Fa");
   1.187 +_LIT(KPath_PushEscapeFront0_3, "/a%3Da/a%3Ba/a%2Fa");
   1.188 +_LIT(KPath_PushEscapeFront0_4, "/a%3Fa/a%3Da/a%3Ba/a%2Fa");
   1.189 +_LIT(KPath_PushEscapeFront0_5, "/a%20a/a%3Fa/a%3Da/a%3Ba/a%2Fa");
   1.190 +
   1.191 +_LIT(KPath_PushEscapeBack0_0, "");
   1.192 +_LIT(KPath_PushEscapeBack0_1, "/a%2Fa");
   1.193 +_LIT(KPath_PushEscapeBack0_2, "/a%2Fa/a%3Ba");
   1.194 +_LIT(KPath_PushEscapeBack0_3, "/a%2Fa/a%3Ba/a%3Da");
   1.195 +_LIT(KPath_PushEscapeBack0_4, "/a%2Fa/a%3Ba/a%3Da/a%3Fa");
   1.196 +_LIT(KPath_PushEscapeBack0_5, "/a%2Fa/a%3Ba/a%3Da/a%3Fa/a%20a");
   1.197 +
   1.198 +_LIT(KPath_PushEscape0_a, "a/a");
   1.199 +_LIT(KPath_PushEscape0_b, "a;a");
   1.200 +_LIT(KPath_PushEscape0_c, "a=a");
   1.201 +_LIT(KPath_PushEscape0_d, "a?a");
   1.202 +_LIT(KPath_PushEscape0_e, "a a");
   1.203 +
   1.204 +#endif	// __DELIMITEDPATHTESTS_H__