os/ossrv/genericservices/httputils/Test/t_uriparser/DelimitedQueryTests.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/DelimitedQueryTests.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,177 @@
     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 __DELIMITEDQUERYTESTS_H__
    1.20 +#define __DELIMITEDQUERYTESTS_H__
    1.21 +
    1.22 +// System includes
    1.23 +//
    1.24 +#include <e32base.h>
    1.25 +
    1.26 +//
    1.27 +//
    1.28 +// Delmiited Query test data
    1.29 +//
    1.30 +//
    1.31 +
    1.32 +_LIT(KQueryParse0,		"a&bc&def&ghij");
    1.33 +_LIT(KQueryParse0Seg0,	"a");
    1.34 +_LIT(KQueryParse0Seg1,	"bc");
    1.35 +_LIT(KQueryParse0Seg2,	"def");
    1.36 +_LIT(KQueryParse0Seg3,	"ghij");
    1.37 +
    1.38 +_LIT(KQueryParse1,		"name=dave&surname=cunado");
    1.39 +_LIT(KQueryParse1Seg0,	"name=dave");
    1.40 +_LIT(KQueryParse1Seg1,	"surname=cunado");
    1.41 +
    1.42 +_LIT(KQueryParse2,		"hello&there=p1&is&there&any&stuff");
    1.43 +_LIT(KQueryParse2Seg0,	"hello");
    1.44 +_LIT(KQueryParse2Seg1,	"there=p1");
    1.45 +_LIT(KQueryParse2Seg2,	"is");
    1.46 +_LIT(KQueryParse2Seg3,	"there");
    1.47 +_LIT(KQueryParse2Seg4,	"any");
    1.48 +_LIT(KQueryParse2Seg5,	"stuff");
    1.49 +
    1.50 +_LIT(KQuery_DelimPresence0, "&afrontdelim&abackdelim&");
    1.51 +TBool KQuery_FrontDelim0 = ETrue;
    1.52 +TBool KQuery_BackDelim0 = ETrue;
    1.53 +
    1.54 +_LIT(KQuery_DelimPresence1, "nofrontdelim&abackdelim&");
    1.55 +TBool KQuery_FrontDelim1 = EFalse;
    1.56 +TBool KQuery_BackDelim1 = ETrue;
    1.57 +
    1.58 +_LIT(KQuery_DelimPresence2, "&afrontdelim&nobackdelim");
    1.59 +TBool KQuery_FrontDelim2 = ETrue;
    1.60 +TBool KQuery_BackDelim2 = EFalse;
    1.61 +
    1.62 +_LIT(KQuery_DelimPresence3, "nofrontdelim&nobackdelim");
    1.63 +TBool KQuery_FrontDelim3 = EFalse;
    1.64 +TBool KQuery_BackDelim3 = EFalse;
    1.65 +
    1.66 +_LIT(KQuery_Rem_Forwards0_0, "a&bc&def&ghikj");
    1.67 +_LIT(KQuery_Rem_Forwards0_1, "&bc&def&ghikj");
    1.68 +_LIT(KQuery_Rem_Forwards0_2, "&def&ghikj");
    1.69 +_LIT(KQuery_Rem_Forwards0_3, "&ghikj");
    1.70 +
    1.71 +_LIT(KQuery_Rem_Backwards0_0, "a&bc&def&ghikj");
    1.72 +_LIT(KQuery_Rem_Backwards0_1, "a&bc&def");
    1.73 +_LIT(KQuery_Rem_Backwards0_2, "a&bc");
    1.74 +_LIT(KQuery_Rem_Backwards0_3, "a");
    1.75 +
    1.76 +_LIT(KQuery_Des0, "a&bc&def&ghij/");
    1.77 +
    1.78 +_LIT(KQuery_PushPopFront0_0, "");
    1.79 +_LIT(KQuery_PushPopFront0_1, "&zero");
    1.80 +_LIT(KQuery_PushPopFront0_2, "&one&zero");
    1.81 +_LIT(KQuery_PushPopFront0_3, "&two&one&zero");
    1.82 +_LIT(KQuery_PushPopFront0_4, "&three&two&one&zero");
    1.83 +_LIT(KQuery_PushPopFront0_5, "&four&three&two&one&zero");
    1.84 +
    1.85 +_LIT(KQuery_PushPopBack0_0, "");
    1.86 +_LIT(KQuery_PushPopBack0_1, "&zero");
    1.87 +_LIT(KQuery_PushPopBack0_2, "&zero&one");
    1.88 +_LIT(KQuery_PushPopBack0_3, "&zero&one&two");
    1.89 +_LIT(KQuery_PushPopBack0_4, "&zero&one&two&three");
    1.90 +_LIT(KQuery_PushPopBack0_5, "&zero&one&two&three&four");
    1.91 +
    1.92 +_LIT(KQuery_Push0_a, "zero");
    1.93 +_LIT(KQuery_Push0_b, "one");
    1.94 +_LIT(KQuery_Push0_c, "two");
    1.95 +_LIT(KQuery_Push0_d, "three");
    1.96 +_LIT(KQuery_Push0_e, "four");
    1.97 +
    1.98 +_LIT(KQuery_AddTrimDelim0, "zero&one&two&three&four");
    1.99 +
   1.100 +_LIT(KQuery_InsertBackwards0_0, "some&rubbish&before&some&rubbish&after");
   1.101 +_LIT(KQuery_InsertBackwards0_1, "some&rubbish&before&zero&some&rubbish&after");
   1.102 +_LIT(KQuery_InsertBackwards0_2, "some&rubbish&before&one&zero&some&rubbish&after");
   1.103 +_LIT(KQuery_InsertBackwards0_3, "some&rubbish&before&two&one&zero&some&rubbish&after");
   1.104 +_LIT(KQuery_InsertBackwards0_4, "some&rubbish&before&three&two&one&zero&some&rubbish&after");
   1.105 +_LIT(KQuery_InsertBackwards0_5, "some&rubbish&before&four&three&two&one&zero&some&rubbish&after");
   1.106 +const TInt KQueryInsertBackwardsPos0 = 3;
   1.107 +
   1.108 +_LIT(KQuery_RemoveBackwards0_5, "some&rubbish&before&some&rubbish&after");
   1.109 +_LIT(KQuery_RemoveBackwards0_4, "some&rubbish&before&zero&some&rubbish&after");
   1.110 +_LIT(KQuery_RemoveBackwards0_3, "some&rubbish&before&zero&one&some&rubbish&after");
   1.111 +_LIT(KQuery_RemoveBackwards0_2, "some&rubbish&before&zero&one&two&some&rubbish&after");
   1.112 +_LIT(KQuery_RemoveBackwards0_1, "some&rubbish&before&zero&one&two&three&some&rubbish&after");
   1.113 +_LIT(KQuery_RemoveBackwards0_0, "some&rubbish&before&zero&one&two&three&four&some&rubbish&after");
   1.114 +const TInt KQueryRemoveBackwardsPos0 = 3;
   1.115 +
   1.116 +_LIT(KQuery_InsertForwards0_0, "some&rubbish&before&some&rubbish&after");
   1.117 +_LIT(KQuery_InsertForwards0_1, "some&rubbish&before&zero&some&rubbish&after");
   1.118 +_LIT(KQuery_InsertForwards0_2, "some&rubbish&before&zero&one&some&rubbish&after");
   1.119 +_LIT(KQuery_InsertForwards0_3, "some&rubbish&before&zero&one&two&some&rubbish&after");
   1.120 +_LIT(KQuery_InsertForwards0_4, "some&rubbish&before&zero&one&two&three&some&rubbish&after");
   1.121 +_LIT(KQuery_InsertForwards0_5, "some&rubbish&before&zero&one&two&three&four&some&rubbish&after");
   1.122 +const TInt KQueryInsertForwardsPos0 = 3;
   1.123 +
   1.124 +_LIT(KQuery_RemoveForwards0_5, "some&rubbish&before&some&rubbish&after");
   1.125 +_LIT(KQuery_RemoveForwards0_4, "some&rubbish&before&zero&some&rubbish&after");
   1.126 +_LIT(KQuery_RemoveForwards0_3, "some&rubbish&before&one&zero&some&rubbish&after");
   1.127 +_LIT(KQuery_RemoveForwards0_2, "some&rubbish&before&two&one&zero&some&rubbish&after");
   1.128 +_LIT(KQuery_RemoveForwards0_1, "some&rubbish&before&three&two&one&zero&some&rubbish&after");
   1.129 +_LIT(KQuery_RemoveForwards0_0, "some&rubbish&before&four&three&two&one&zero&some&rubbish&after");
   1.130 +const TInt KQueryRemoveForwardsPos0 = 3;
   1.131 +
   1.132 +_LIT(KQuery_Insert0_a, "zero");
   1.133 +_LIT(KQuery_Insert0_b, "one");
   1.134 +_LIT(KQuery_Insert0_c, "two");
   1.135 +_LIT(KQuery_Insert0_d, "three");
   1.136 +_LIT(KQuery_Insert0_e, "four");
   1.137 +
   1.138 +_LIT(KQuery_InsertEscapeBackwards0_0, "some&rubbish&before&some&rubbish&after");
   1.139 +_LIT(KQuery_InsertEscapeBackwards0_1, "some&rubbish&before&a%2Fa&some&rubbish&after");
   1.140 +_LIT(KQuery_InsertEscapeBackwards0_2, "some&rubbish&before&a%3Ba&a%2Fa&some&rubbish&after");
   1.141 +_LIT(KQuery_InsertEscapeBackwards0_3, "some&rubbish&before&a%3Da&a%3Ba&a%2Fa&some&rubbish&after");
   1.142 +_LIT(KQuery_InsertEscapeBackwards0_4, "some&rubbish&before&a%3Fa&a%3Da&a%3Ba&a%2Fa&some&rubbish&after");
   1.143 +_LIT(KQuery_InsertEscapeBackwards0_5, "some&rubbish&before&a%20a&a%3Fa&a%3Da&a%3Ba&a%2Fa&some&rubbish&after");
   1.144 +const TInt KQueryInsertEscapeBackwardsPos0 = 3;
   1.145 +
   1.146 +_LIT(KQuery_InsertEscapeForwards0_0, "some&rubbish&before&some&rubbish&after");
   1.147 +_LIT(KQuery_InsertEscapeForwards0_1, "some&rubbish&before&a%2Fa&some&rubbish&after");
   1.148 +_LIT(KQuery_InsertEscapeForwards0_2, "some&rubbish&before&a%2Fa&a%3Ba&some&rubbish&after");
   1.149 +_LIT(KQuery_InsertEscapeForwards0_3, "some&rubbish&before&a%2Fa&a%3Ba&a%3Da&some&rubbish&after");
   1.150 +_LIT(KQuery_InsertEscapeForwards0_4, "some&rubbish&before&a%2Fa&a%3Ba&a%3Da&a%3Fa&some&rubbish&after");
   1.151 +_LIT(KQuery_InsertEscapeForwards0_5, "some&rubbish&before&a%2Fa&a%3Ba&a%3Da&a%3Fa&a%20a&some&rubbish&after");
   1.152 +const TInt KQueryInsertEscapeForwardsPos0 = 3;
   1.153 +
   1.154 +_LIT(KQuery_InsertEscape0_a, "a/a");
   1.155 +_LIT(KQuery_InsertEscape0_b, "a;a");
   1.156 +_LIT(KQuery_InsertEscape0_c, "a=a");
   1.157 +_LIT(KQuery_InsertEscape0_d, "a?a");
   1.158 +_LIT(KQuery_InsertEscape0_e, "a a");
   1.159 +
   1.160 +_LIT(KQuery_PushEscapeFront0_0, "");
   1.161 +_LIT(KQuery_PushEscapeFront0_1, "&a%2Fa");
   1.162 +_LIT(KQuery_PushEscapeFront0_2, "&a%3Ba&a%2Fa");
   1.163 +_LIT(KQuery_PushEscapeFront0_3, "&a%3Da&a%3Ba&a%2Fa");
   1.164 +_LIT(KQuery_PushEscapeFront0_4, "&a%3Fa&a%3Da&a%3Ba&a%2Fa");
   1.165 +_LIT(KQuery_PushEscapeFront0_5, "&a%20a&a%3Fa&a%3Da&a%3Ba&a%2Fa");
   1.166 +
   1.167 +_LIT(KQuery_PushEscapeBack0_0, "");
   1.168 +_LIT(KQuery_PushEscapeBack0_1, "&a%2Fa");
   1.169 +_LIT(KQuery_PushEscapeBack0_2, "&a%2Fa&a%3Ba");
   1.170 +_LIT(KQuery_PushEscapeBack0_3, "&a%2Fa&a%3Ba&a%3Da");
   1.171 +_LIT(KQuery_PushEscapeBack0_4, "&a%2Fa&a%3Ba&a%3Da&a%3Fa");
   1.172 +_LIT(KQuery_PushEscapeBack0_5, "&a%2Fa&a%3Ba&a%3Da&a%3Fa&a%20a");
   1.173 +
   1.174 +_LIT(KQuery_PushEscape0_a, "a/a");
   1.175 +_LIT(KQuery_PushEscape0_b, "a;a");
   1.176 +_LIT(KQuery_PushEscape0_c, "a=a");
   1.177 +_LIT(KQuery_PushEscape0_d, "a?a");
   1.178 +_LIT(KQuery_PushEscape0_e, "a a");
   1.179 +
   1.180 +#endif	// __DELIMITEDQUERYTESTS_H__