PageRenderTime 11ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/externals/google-toolbox-for-mac/Foundation/TestData/GTMURITemplateRFCTests.json

http://macfuse.googlecode.com/
JSON | 131 lines | 131 code | 0 blank | 0 comment | 0 complexity | 09be6e59df6514d90e55814fd6f8f5c7 MD5 | raw file
  1{
  2  "Test Suite 1" :
  3  {
  4    "variables": {
  5       "var"   : "value",
  6       "hello" : "Hello World!",
  7       "empty" : "",
  8       "list"  : [ "val1", "val2", "val3" ],
  9       "keys"  : {"key1": "val1", "key2": "val2"},
 10       "path"  : "/foo/bar",
 11       "x"     : "1024",
 12       "y"     : "768"
 13     },
 14     "testcases" : [
 15        ["{var}", "value"],
 16        ["{hello}", "Hello%20World%21"],
 17        ["{path}/here", "%2Ffoo%2Fbar/here"],
 18        ["{x,y}", "1024,768"],
 19        ["{var=default}", "value"],
 20        ["{undef=default}", "default"],
 21        ["{list}", "val1,val2,val3"],
 22        ["{list*}", "val1,val2,val3"],
 23        ["{list+}", "list.val1,list.val2,list.val3"],
 24        ["{keys}", "key1,val1,key2,val2"],
 25        ["{keys*}", "key1,val1,key2,val2"],
 26        ["{keys+}", "keys.key1,val1,keys.key2,val2"],
 27        ["{+var}", "value"],
 28        ["{+hello}", "Hello%20World!"],
 29        ["{+path}/here", "/foo/bar/here"],
 30        ["{+path,x}/here", "/foo/bar,1024/here"],
 31        ["{+path}{x}/here", "/foo/bar1024/here"],
 32        ["{+empty}/here", "/here"],
 33        ["{+undef}/here", "/here"],
 34        ["{+list}", "val1,val2,val3"],
 35        ["{+list*}", "val1,val2,val3"],
 36        ["{+list+}", "list.val1,list.val2,list.val3"],
 37        ["{+keys}", "key1,val1,key2,val2"],
 38        ["{+keys*}", "key1,val1,key2,val2"],
 39        ["{+keys+}", "keys.key1,val1,keys.key2,val2"],
 40        ["{;x,y}", ";x=1024;y=768"],
 41        ["{;x,y,empty}", ";x=1024;y=768;empty"],
 42        ["{;x,y,undef}", ";x=1024;y=768"],
 43        ["{;list}", ";val1,val2,val3"],
 44        ["{;list*}", ";val1;val2;val3"],
 45        ["{;list+}", ";list=val1;list=val2;list=val3"],
 46        ["{;keys}", ";key1,val1,key2,val2"],
 47        ["{;keys*}", ";key1=val1;key2=val2"],
 48        ["{;keys+}", ";keys.key1=val1;keys.key2=val2"],
 49        ["{?x,y}", "?x=1024&y=768"],
 50        ["{?x,y,empty}", "?x=1024&y=768&empty"],
 51        ["{?x,y,undef}", "?x=1024&y=768"],
 52        ["{?list}", "?list=val1,val2,val3"],
 53        ["{?list*}", "?val1&val2&val3"],
 54        ["{?list+}", "?list=val1&list=val2&list=val3"],
 55        ["{?keys}", "?keys=key1,val1,key2,val2"],
 56        ["{?keys*}", "?key1=val1&key2=val2"],
 57        ["{?keys+}", "?keys.key1=val1&keys.key2=val2"],
 58        ["{/var}", "/value"],
 59        ["{/var,empty}", "/value/"],
 60        ["{/var,undef}", "/value"],
 61        ["{/list}", "/val1,val2,val3"],
 62        ["{/list*}", "/val1/val2/val3"],
 63        ["{/list*,x}", "/val1/val2/val3/1024"],
 64        ["{/list+}", "/list.val1/list.val2/list.val3"],
 65        ["{/keys}", "/key1,val1,key2,val2"],
 66        ["{/keys*}", "/key1/val1/key2/val2"],
 67        ["{/keys+}", "/keys.key1/val1/keys.key2/val2"],
 68        ["X{.var}", "X.value"],
 69        ["X{.empty}", "X"],
 70        ["X{.undef}", "X"],
 71        ["X{.list}", "X.val1,val2,val3"],
 72        ["X{.list*}", "X.val1.val2.val3"],
 73        ["X{.list*,x}", "X.val1.val2.val3.1024"],
 74        ["X{.list+}", "X.list.val1.list.val2.list.val3"],
 75        ["X{.keys}", "X.key1,val1,key2,val2"],
 76        ["X{.keys*}", "X.key1.val1.key2.val2"],
 77        ["X{.keys+}", "X.keys.key1.val1.keys.key2.val2"]
 78     ]
 79  },
 80  "Test Suite 2" :
 81  {
 82    "variables": {
 83       "var"        : "value",
 84       "empty"      : "",
 85       "name"       : [ "Fred", "Wilma", "Pebbles" ],
 86       "favs"       : {"color":"red", "volume": "high"},
 87       "empty_list" : [],
 88       "empty_keys" : {} 
 89     },
 90     "testcases" : [
 91        ["{var=default}", "value"],
 92        ["{undef=default}", "default"],
 93        ["x{empty}y", "xy"],
 94        ["x{empty=_}y", "xy"],
 95        ["x{undef}y", "xy"],
 96        ["x{undef=_}y", "x_y"],
 97        ["x{empty_list}y", "xy"],
 98        ["x{empty_list=_}y", "x_y"],
 99        ["x{empty_list*}y", "xy"],
100        ["x{empty_list*=_}y", "x_y"],
101        ["x{empty_list+}y", "xy"],
102        ["x{empty_list+=_}y", "x_y"],
103        ["x{empty_keys}y", "xy"],
104        ["x{empty_keys=_}y", "x_y"],
105        ["x{empty_keys*}y", "xy"],
106        ["x{empty_keys*=_}y", "x_y"],
107        ["x{empty_keys+}y", "xy"],
108        ["x{empty_keys+=_}y", "x_y"],
109        ["x{?name=none}", "x?name=Fred,Wilma,Pebbles"],
110        ["x{?favs=none}", "x?favs=color,red,volume,high"],
111        ["x{?favs*=none}", "x?color=red&volume=high"],
112        ["x{?favs+=none}", "x?favs.color=red&favs.volume=high"],
113        ["x{?undef}", "x"],
114        ["x{?undef=none}", "x?undef=none"],
115        ["x{?empty}", "x?empty"],
116        ["x{?empty=none}", "x?empty"],
117        ["x{?empty_list}", "x"],
118        ["x{?empty_list=none}", "x?empty_list=none"],
119        ["x{?empty_list*}", "x"],
120        ["x{?empty_list*=none}", "x?empty_list=none"],
121        ["x{?empty_list+}", "x"],
122        ["x{?empty_list+=none}", "x?empty_list=none"],
123        ["x{?empty_keys}", "x"],
124        ["x{?empty_keys=none}", "x?empty_keys=none"],
125        ["x{?empty_keys*}", "x"],
126        ["x{?empty_keys*=none}", "x?empty_keys=none"],
127        ["x{?empty_keys+}", "x"],
128        ["x{?empty_keys+=none}", "x?empty_keys=none"]
129     ]
130  }
131}